CVE-2021-23648 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in @braintree/sanitize-url. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for @braintree/sanitize-url — see the affected versions and patch details below.
Cross-site Scripting in sanitize-url
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@braintree/sanitize-urlnpmDescription
The package @braintree/sanitize-url before 6.0.0 is vulnerable to Cross-site Scripting (XSS) due to improper sanitization in the sanitizeUrl function.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @braintree/sanitize-url | all versions | 6.0.0npm install @braintree/sanitize-url@6.0.0 |
Affected Products
fedorafedoraprojectbraintree\/sanitize-urlpaypalResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @braintree/sanitize-url, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @braintree/sanitize-url to 6.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-23648 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 8 | grafana-0:7.5.15-3.el8 | RHSA-2022:7519 |
| Red Hat Enterprise Linux 9 | grafana-0:7.5.15-3.el9 | RHSA-2022:8057 |
| Red Hat OpenShift Container Platform 4.11 | openshift4/ose-grafana:v4.11.0-202208020235.p0.g6773185.assembly.stream | RHSA-2022:5069 |
Frequently Asked Questions
Is CVE-2021-23648 in your dependencies?
Find it across npm, including transitive dependencies.