Sign in

At least 8 characters.

Already have one?

Free checkBy Yusuf, VXSec

Can one link make your app hand over its cloud keys?

I built a demo AI app that summarizes any link you paste. My blog got a normal summary. Then I pasted the one address a cloud server uses to get its own keys, and the app read them out to me.

Fastest way to know: on a test copy of your app, paste http://169.254.169.254/latest/meta-data/ into every box that takes a link. Your app should refuse it straight away. If anything shows up, or it spins and then times out, your server probably tried to open it.

Only test apps you own.

110K+
views on my bank statement reel
507
people sent the free check from a reel comment
1,395
people follow along on Instagram

Counted from Instagram and my DM log.

What I found

The demo is a "paste a link, get a summary" app, like a lot of AI apps people are shipping right now. The keys it read out were fake ones I planted, so nothing real leaked. The hole is real. The app opened whatever link I gave it, from inside its own server, and nothing stopped it.

So I wrote the obvious fix first: look at the link and refuse it if it starts with a private address. Then I ran ten links at it that all point inside the server, and one normal page.

4 of 10

got past the quick fix

Ten links, all aimed inside the server. Checking the text of the link stopped 6. The full check in the fix below stopped all 10 and still read the normal page.

The linkQuick fixFull check
The cloud address, typed plainlyStoppedStopped
The same address as one long numberStoppedStopped
The same address in hexStoppedStopped
The same address wrapped as IPv6Let throughStopped
A normal-looking name that points at itStoppedStopped
A public site that redirects to itLet throughStopped
The server itself, short formStoppedStopped
A normal-looking name that points at the serverLet throughStopped
An office network addressStoppedStopped
A file on the serverLet throughStopped
A normal public pageRead itRead it

Why it happens

When someone pastes a link, your server opens it, not their browser. Your server sits inside your cloud, so it can reach addresses nobody outside can. On AWS, a server that has a cloud role can ask 169.254.169.254 for that role's keys. The older setting hands them to any plain request, so an app that opens whatever it's given reads them out.

Those keys work from anywhere. The Capital One breach in 2019, about 100 million people in the US and 6 million in Canada, is widely described as this hole aimed at that address. Stolen cloud keys also get used fast. AWS's security team reported crypto miners running within 10 minutes of attackers getting in, in December 2025. One AWS customer posted a $45,000 bill in 2021 after their account was hacked to mine about $800 of crypto.

The features that have it are any place your server opens a link someone typed: summarize this page, link previews, import from a link, a profile picture from a link, webhooks users can set, and "save this page as a PDF".

Check yours in 5 minutes

Do this on a test copy of your app, like a preview or staging deploy. Not on the live one.

  1. Write down every feature where your server opens a link someone typed. The list above is where to look.
  2. In each one, paste http://169.254.169.254/latest/meta-data/, then http://localhost/.
  3. Watch what comes back. A pass is an error straight away saying the link isn't allowed.

Anything from the address showing up is a fail. So is a long spin and then a timeout, which usually means your server tried. This catches the plain case. Redirects and names that point inside need the code check in the next step.

Your app tried to open it?

The fix is below. If the app runs on a cloud server with real keys, send it to me. I fix one finding from $150, and you get the price in writing before I start.

Get it fixed

Let your AI check the code

Paste this into the chat that has your app open, like Claude Code, Cursor, Lovable or Bolt. It only reads.

Find every place my server opens a URL that a user gave it: link summaries, previews, imports, images from a URL, webhooks. For each one, tell me:
1. Does it refuse private and cloud addresses like 169.254.169.254, localhost and 10.x before it fetches?
2. Does it check where the name really points when it connects, not just the text of the link?
3. Does it check every redirect the same way?
Show me the code for each place. Don't change anything yet.

Any "no" is a hole. The fix below covers all three. Your AI reads your code on your side, so nothing comes to VXSec.

How to fix it

1. Check where every link really points, on every hop. This is the full check from my test, for Node with no packages. I ran it on Node 24: all ten inside links refused, the normal page still read fine, and slow pages got cut off at the time limit. Swap your fetch for safeFetch.

// safeFetch: read a link a user gave you, but refuse anything that points inside your own network or cloud.
// Node, no packages. Tested on Node 24.
import dns from 'node:dns';
import net from 'node:net';
import http from 'node:http';
import https from 'node:https';

const blocked = new net.BlockList();
for (const [ip, bits] of [['0.0.0.0', 8], ['10.0.0.0', 8], ['100.64.0.0', 10], ['127.0.0.0', 8], ['169.254.0.0', 16],
  ['172.16.0.0', 12], ['192.168.0.0', 16], ['198.18.0.0', 15], ['224.0.0.0', 3]]) blocked.addSubnet(ip, bits, 'ipv4');
// No '::ffff:0:0/96' rule: Node matches every IPv4 address against it. Wrapped IPv4 is unwrapped in isPrivate instead.
for (const [ip, bits] of [['::', 127], ['64:ff9b::', 96], ['fc00::', 7], ['fe80::', 10], ['ff00::', 8]])
  blocked.addSubnet(ip, bits, 'ipv6');

export function isPrivate(ip) {
  const wrapped = /^::ffff:/i.test(ip) && ip.slice(7);
  if (wrapped) return isPrivate(net.isIP(wrapped) ? wrapped : hexToV4(wrapped));
  const type = net.isIP(ip);
  return type === 0 || blocked.check(ip, type === 4 ? 'ipv4' : 'ipv6');
}

function hexToV4(h) { // '::ffff:a9fe:a9fe' -> '169.254.169.254'
  const [a, b] = h.split(':').map(x => parseInt(x, 16));
  return [a >> 8, a & 255, b >> 8, b & 255].join('.');
}

// Checked at the moment of connecting, so the name can't point somewhere else a second later.
function checkedLookup(host, opts, cb) {
  dns.lookup(host, { all: true }, (err, addrs) => {
    if (err) return cb(err);
    if (addrs.some(a => isPrivate(a.address))) return cb(new Error(`refused: ${host} points inside the network`));
    opts.all ? cb(null, addrs) : cb(null, addrs[0].address, addrs[0].family);
  });
}

export async function safeFetch(link, hopsLeft = 3, endBy = Date.now() + 10_000) {
  const url = new URL(link);
  if (url.protocol !== 'http:' && url.protocol !== 'https:') throw new Error('refused: only http and https');
  if (url.port && url.port !== '80' && url.port !== '443') throw new Error('refused: unusual port');
  const host = url.hostname.replace(/^\[|\]$/g, '');
  if (net.isIP(host) && isPrivate(host)) throw new Error('refused: private address');

  let timer;
  try {
    const res = await new Promise((resolve, reject) => {
      const req = (url.protocol === 'https:' ? https : http).get(url, { lookup: checkedLookup, timeout: 5000 }, resolve);
      // One hard limit from the first byte asked to the last byte read, redirects included,
      // so a slow server can't hold it open.
      timer = setTimeout(() => req.destroy(new Error('timed out')), Math.max(0, endBy - Date.now()));
      req.on('timeout', () => req.destroy(new Error('timed out')));
      req.on('error', reject);
    });

    if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
      res.resume();
      if (hopsLeft === 0) throw new Error('refused: too many redirects');
      return await safeFetch(new URL(res.headers.location, url).href, hopsLeft - 1, endBy); // every hop gets the same checks
    }
    let body = '';
    for await (const chunk of res) {
      body += chunk;
      if (body.length > 2_000_000) { res.destroy(); throw new Error('refused: page too big'); }
    }
    return { status: res.statusCode, body };
  } finally {
    clearTimeout(timer);
  }
}

On another language, ask your AI to write the same three checks and test them with the cloud address written a few different ways, a name that points inside, and a redirect. Then test a normal link too.

2. On AWS servers, set IMDSv2 to Required. In the EC2 console: Instances, pick the server, Actions, Instance settings, Modify instance metadata options, set IMDSv2 to Required, Save. The server then only hands out keys after a separate token request, which a link fetch can't make. AWS says it protects against SSRF. Check the MetadataNoToken number in CloudWatch is at zero first, so you know nothing on the server still uses the old way.

aws ec2 modify-instance-metadata-options --instance-id i-1234567890abcdef0 --http-tokens required --http-endpoint enabled

3. Give the server's cloud role only what it needs. If keys ever get out, they open only what the role can open. A summary app's server doesn't need every storage bucket.

4. If your test ever showed keys, treat them as stolen. Look through the cloud account for users, keys and servers you didn't make.

What still catches people

  • Checking the text of the link. My quick fix stopped 6 of 10. It missed the IPv6 one, the redirect, the normal name that points at the server, and the file link.
  • Letting the fetch follow redirects on its own. The second hop skips your check.
  • Blocking the whole internet. My first full version refused example.com too. Node's built-in block list matches every normal IPv4 address against the rule for IPv6-wrapped ones. Test a normal link after every change.
  • Fixing only the main feature. Link previews and "picture from a link" are the ones people forget.

Questions

Does this only matter on AWS?

No. Google Cloud and Azure have the same kind of address. They ask for a special header that a plain link fetch doesn't send, so it's harder there. Your server can still reach other private things, like an admin page or a database on the same network.

Only my own users can paste links. Is that safe?

Anyone who can make an account is one of your users. Treat every link like it came from a stranger.

Can I test someone else's app?

Only with their written permission.

Do you see my app when I do this?

No. You test your own copy, and your AI reads your own code. Nothing comes to VXSec.

Before you launch

This is one hole. Launch Gate runs six other checks in one go on a test copy of your app, like who can see whose data, and gives you one page of results with proof. Members get it inside their own AI.

VXSec Membership

$19a month, or $190 a year

  • Workspace Setup
  • AI Reach Map
  • Agent Brakes
  • Launch Gate
  • Leaver Check
  • Every new helper, the day it's out
Join VXSec

Rather have it done for you? I fix it $150 and up, 20% off for members · Launch Review $297 once, I check and fix the top 3 · Built for you $1,500 a month and up

Next check: can one user open another user's data?