Skip to content
XSS Write-up Intermediate

Exploiting Web3's Hidden Attack Surface: Universal XSS on Netlify's Next.js Library

The netlify-ipx library improperly handled the x-forwarded-proto header, allowing an attacker to overwrite the URL used for server-side image fetching. Combined with caching, this enabled stored cross-site scripting and server-side request forgery on any website using the library.

Sam Curry Follow

Published on samcurry.net

On August 24th, 2022, we reported a vulnerability to Netlify affecting their Next.js "netlify-ipx" repository which would allow an attacker to achieve persistent cross-site scripting and full-response server side request forgery on any website out of the box. The vulnerability was fixed on August 26th, 2022, and…

Sam Curry (@samwcyo), on samcurry.net

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could execute arbitrary JavaScript and HTML in the context of any website running netlify-ipx, leading to stored XSS and SSRF.

What the attacker needed

Target uses netlify-ipx

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The netlify-ipx library fetches images from other servers. An attacker could make the server fetch their file and cache it, letting them run JavaScript on the victim site.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Sam Curry

View all

11 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.