Description
This affects all versions of package osm-static-maps. 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.
Remediation
References
https://github.com/jperelli/osm-static-maps/blob/master/src/template.html%23L142
https://snyk.io/vuln/SNYK-JS-OSMSTATICMAPS-609637
https://github.com/jperelli/osm-static-maps/pull/24
Related Vulnerabilities
CVE-2020-13942 Vulnerability in maven package org.apache.unomi:unomi-persistence-elasticsearch-core
CVE-2019-10752 Vulnerability in npm package sequelize
CVE-2022-28820 Vulnerability in maven package com.adobe.acs:acs-aem-commons
CVE-2023-26156 Vulnerability in maven package org.webjars.npm:chromedriver
CVE-2019-10346 Vulnerability in maven package org.jenkins-ci.plugins:embeddable-build-status