Server-side Request Forgery (SSRF) Affecting osm-static-maps package, versions <3.9.0
Threat Intelligence
Do your applications use this vulnerable package?
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 applications- Snyk ID SNYK-JS-OSMSTATICMAPS-609637
- published 19 Oct 2020
- disclosed 3 Sep 2020
- credit Vasilii Ermilov
Introduced: 3 Sep 2020
CVE-2020-7749 Open this link in a new tabHow to fix?
Upgrade osm-static-maps
to version 3.9.0 or higher.
Overview
osm-static-maps is a Create a static image of a map with the features you want
Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF). User input given to the package is passed directly to a template without escaping (
{{{ ... }}})
. As such, it is possible for an attacker to inject arbitrary HTML/JS code and depending on the context.
It will be outputted as an HTML on the page which gives opportunity for XSS or rendered on the server (puppeteer) which also gives opportunity for SSRF and Local File Read.
PoC
git clone https://github.com/jperelli/osm-static-maps.git
cd osm-static-maps
npm install
npm run start
XSS Example
http://localhost:3000/dynamic?tileserverUrl=%27%2Balert(1)%2B%27