Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Server-Side Request Forgery (SSRF) vulnerabilities in an interactive lesson.
Start learningUpgrade nossrf
to version 1.0.4 or higher.
Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF) where an attacker can provide a hostname that resolves to a local or reserved IP address space and bypass the SSRF protection mechanism.
app.js
file with the programmatic API of nossrf
as follows:const nossrf = require("nossrf") const main = async()=> { let is_safe = await nossrf.asyncValidateUrl("https://google.com") // true means good console.log(is_safe)
let is_safe2 = await nossrf.asyncValidateUrl("https://localtest.me") // true means good console.log(is_safe2)
}
main()
Run the app.js
file
Validate that the localtest.me hostname resolves to a local IP address space 127.0.0.1 and the SSRF protection mechanism is bypassed since for both of the two URLs the response is true