DEV Community

Cover image for How a Simple “Upload by Link” Feature Can Hack Your Own Servers
YogSec
YogSec

Posted on

How a Simple “Upload by Link” Feature Can Hack Your Own Servers

Most modern apps let users upload things like:

  • Profile pictures
  • PDFs and invoices
  • Documents
  • Company logos

And often, instead of uploading a file, the app allows uploading by link.

Example:

“Paste a URL and we’ll fetch the image or PDF for you.”

Sounds harmless, right?
Unfortunately, this small feature has caused serious security breaches in many real companies.

Let’s understand why — in simple terms.


The Hidden Problem Behind “Upload via URL”

When your app accepts a link like:

https://example.com/file.pdf

Your server goes and downloads that file.

That means:

  • Your server is visiting a website
  • Your server is making a request
  • Your server trusts the link provided by the user

Now imagine if the link is not a normal website.

This is where the risk starts.


What Attackers Actually Do (No Technical Details)

Instead of giving a normal website link, an attacker gives a special internal link that:

  • Points to your own server
  • Points to your internal tools
  • Points to your cloud infrastructure

Your server doesn’t realize it’s dangerous — it just follows the instruction.

This is called SSRF (Server-Side Request Forgery), but you don’t need to remember the name.

Just remember this:

Your app is tricked into attacking itself.


Real-World Example (Simple)

Let’s say your app has this feature:

“Import PDF from a link”

An attacker gives a link that secretly points to:

  • Your internal admin panel
  • Your database service
  • Your cloud provider’s secret system

Your server opens it and may accidentally expose:

  • Passwords
  • API keys
  • Internal data
  • Cloud access credentials

This has happened to real companies, not just theory.


Why This Is So Dangerous

Because:

  • No login bypass is needed
  • No password cracking is needed
  • No malware is uploaded

The attacker just uses a normal app feature.

In many cases, this leads to:

  • Full server access
  • Data leaks
  • Cloud account takeover
  • Massive financial impact

Common Features Where This Happens

If your app has any of these, pay attention:

  • Upload image using URL
  • Import PDF or document from link
  • Generate PDF from a webpage
  • Fetch logo during onboarding
  • Webhooks or callbacks
  • Any feature where your server “fetches” something

Why Developers Miss This

Because the feature looks safe.

Developers often think:

“We only download images or PDFs. What could go wrong?”

The issue is not the file.
The issue is who your server is trusting.


Simple Advice for Founders & Product Owners

You don’t need to code to reduce this risk.

Just ask your team these questions:

  • Do we allow users to upload files using links?
  • Does our server download those links?
  • Are we blocking internal and private addresses?
  • Are we validating where the server is allowed to connect?

If the answers are unclear — that’s already a warning sign.


Why This Matters for Startups

Startups move fast.
Security checks often come later.
Attackers know this.

SSRF vulnerabilities are:

  • Easy to miss
  • Easy to exploit
  • Very high impact

Many bug bounty reports and real incidents start exactly like this.


Final Thought

If your server blindly trusts user-provided links,
someone else might control where your server goes.

A small feature can become a big problem.


security #startup #websecurity #api #saas #founders #productmanagement #cybersecurity #devops

Top comments (0)