Server-Side Request Forgery (SSRF) in React.js
.jpg)
SSRF isn’t a React bug—it’s a back-end flaw your React app can accidentally trigger. When a front-end sends a URL to an API that then fetches it server-side, attackers can pivot that API to read internal services, cloud metadata, or files. Read more security posts: https://www.pentesttesting.com/blog/ How React Front-Ends Accidentally Cause SSRF React UIs often have features like “Preview URL”, “Import from RSS”, or “Fetch webhook status”. If the server blindly fetches user-supplied URLs, it might access http://169.254.169.254/ (cloud creds), http://localhost:2375/ (Docker), or internal hosts like http://intranet-db:5432 . Vulnerable Pattern (React + Node) React component (sends any URL to the API): // Danger: lets users request any URL via your server export default function Preview() { const [url, setUrl] = React.useState(""); const [data, setData] = React.useState(""); const go = async () => { const res = await fetch("/api/fetch?url=...