{"id":"CVE-2025-48939","published":"2025-07-03T16:26:31Z","modified":"2025-07-03T19:15:22Z","title":"tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript","vendor":"AmauriC","product":"tarteaucitron.js","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.2,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00204,"percentile":0.10543,"provenance":"source"},"cwes":[{"id":"CWE-138","name":"Improper Neutralization of Special Elements"}],"references":[{"url":"https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-q43x-79jr-cq98","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/AmauriC/tarteaucitron.js/commit/230a3b69d363837acfa895823d841e0608826ba3","tags":["x_refsource_MISC"]}],"priority":{"score":5.0,"factors":[{"name":"EPSS percentile","points":2.11},{"name":"CVSS severity","points":2.94}]},"vendorSlug":"amauric","affectedVersions":[{"vendor":"AmauriC","product":"tarteaucitron.js","versions":["< 1.22.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-07-03T19:13:08.496030Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"tarteaucitronjs","vulnerableRanges":["<1.22.0"],"patched":["1.22.0"],"from":["GHSA-q43x-79jr-cq98"],"provenance":"source"}],"summary":{"text":"tarteaucitron.js, a cookie banner library by AmauriC, accesses document.currentScript without confirming it is a real script element, so an injected HTML element can clobber that property through DOM Clobbering and cause the script to resolve the wrong element. An attacker who can control the page's HTML, requiring high privileges and user interaction in a local context, could use this to change the CDN domain the library loads from; the flaw affects versions before 1.22.0.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:20:59Z"},"euvd":{"id":"EUVD-2025-19885","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-31138","published":"2025-04-07","fixed":"1.20.1","kev":false},{"cve":"CVE-2025-31475","published":"2025-04-07","fixed":"1.20.1","kev":false},{"cve":"CVE-2025-31476","published":"2025-04-07","fixed":"1.20.1","kev":false,"link":{"from":"CVE-2025-31476","to":"CVE-2025-48939","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:tarteaucitronjs","fromFixed":"1.20.1","toFixed":"1.22.0","daysApart":87},{"kind":"same-code","provenance":"machine","files":["tarteaucitron.js","tarteaucitron.min.js"],"commits":["https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02","https://github.com/AmauriC/tarteaucitron.js/commit/230a3b69d363837acfa895823d841e0608826ba3"],"basis":"shared file"}]}},{"cve":"CVE-2025-48939","published":"2025-07-03","fixed":"1.22.0","kev":false},{"cve":"CVE-2026-22809","published":"2026-01-13","fixed":"1.29.0","kev":false,"link":{"from":"CVE-2025-48939","to":"CVE-2026-22809","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:tarteaucitronjs","fromFixed":"1.22.0","toFixed":"1.29.0","daysApart":194}]}},{"cve":"CVE-2026-49977","published":"2026-07-17","fixed":"1.33.0","kev":false}],"package":"npm:tarteaucitronjs"}}