# CVE-2025-48939: tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript

- Severity: Medium 4.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-07-03T16:26:31.304Z
- Modified: 2026-06-17T09:30:31.167Z
- Also known as: GHSA-q43x-79jr-cq98
- Weaknesses: CWE-138
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- AmauriC tarteaucitron.js: < 1.22.0
- tarteaucitronjs (npm): before 1.22.0
- amauri tarteaucitronjs: before 1.22.0

## Every score

- GitHub_M: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L`
- GitHub: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L`

## References

- <https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-q43x-79jr-cq98> (exploit, patch, vendor-advisory, web)
- <https://github.com/AmauriC/tarteaucitron.js/commit/230a3b69d363837acfa895823d841e0608826ba3> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-48939> (advisory)
- <https://github.com/AmauriC/tarteaucitron.js> (package)

## Sources

- CVE List: [CVE-2025-48939](https://www.cve.org/CVERecord?id=CVE-2025-48939), CVE Terms of Use, modified 2025-07-03
- GitHub Advisory Database: [GHSA-q43x-79jr-cq98](https://github.com/advisories/GHSA-q43x-79jr-cq98), CC-BY-4.0, modified 2025-07-03
- NVD: [CVE-2025-48939](https://nvd.nist.gov/vuln/detail/CVE-2025-48939), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-48939 · Whole record: https://cve.day/CVE-2025-48939.json · Rebuilt by cve.day 2026-11-25T22:59:00.572Z
