CVE-2025-48939
tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
Description
tarteaucitron.js is a compliant and accessible cookie banner. Prior to version 1.22.0, a vulnerability was identified in tarteaucitron.js where document.currentScript was accessed without verifying that it referenced an actual <script> element. If an attacker injected an HTML element, it could clobber the document.currentScript property. This causes the script to resolve incorrectly to an element instead of the <script> tag, leading to unexpected behavior or failure to load the script path correctly. This issue arises because in some browser environments, named DOM elements become properties on the global document object. An attacker with control over the HTML could exploit this to change the CDN domain of tarteaucitron. This issue has been patched in version 1.22.0.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium4.2 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L |
| NVDNVD · Analyzed | 3.1 | Medium4.2 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L |
- EPSS (exploitation in 30 days)
- 0.20% · top 90% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.2.
Weakness
Affected products
- affected < 1.22.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmtarteaucitronjsGHSA-q43x-79jr-cq98 (opens in a new tab)
References (2)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-q43x-79jr-cq98 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2025-48939)Record last updated .