NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2021-23648 — @braintree/sanitize-url

MEDIUMFix: braintree/sanitize-url#40

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

Also known asGHSA-hqq7-2q2v-82xqSNYK-JS-BRAINTREESANITIZEURL-2339882
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Oct 29, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs73th percentile — riskier than 73% of all scored CVEsHighest risk
0.00%0.64%1.29%1.93%0.1%1.4%Apr 26Aug 26Oct 26

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

1 pkg affected

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.

403other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@braintree/sanitize-urlnpm
27.0Mdownloads / week

Description

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

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@braintree/sanitize-urlall versions6.0.0npm install @braintree/sanitize-url@6.0.0

Affected Products

2 products · 4 configurations
OS
fedorafedoraproject
3 versions
343536
Application
braintree\/sanitize-urlpaypal
< 6.0.0
range
Exploits & PoCs
1

Research 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 dependency
  1. Detect

    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.

  2. 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.

  3. 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.

Red HatModerate
ProductFixed inAdvisory
Red Hat Enterprise Linux 8grafana-0:7.5.15-3.el8RHSA-2022:7519
Red Hat Enterprise Linux 9grafana-0:7.5.15-3.el9RHSA-2022:8057
Red Hat OpenShift Container Platform 4.11openshift4/ose-grafana:v4.11.0-202208020235.p0.g6773185.assembly.streamRHSA-2022:5069

Frequently Asked Questions

The package `@braintree/sanitize-url` before 6.0.0 is vulnerable to Cross-site Scripting (XSS) due to improper sanitization in the `sanitizeUrl` function.
O3 Security · Impact-Aware SCA

Is CVE-2021-23648 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-23648: @braintree/sanitize XSS — Fixed in 6.0.0