{"id":"CVE-2025-31476","published":"2025-04-07T14:52:12Z","modified":"2025-06-12T21:03:38Z","title":"tarteaucitron.js allows url scheme injection via unfiltered inputs","vendor":"AmauriC","product":"tarteaucitron.js","tier":"tail","description":{"text":"tarteaucitron.js is a compliant and accessible cookie banner. A vulnerability was identified in tarteaucitron.js, allowing a user with high privileges (access to the site's source code or a CMS plugin) to enter a URL containing an insecure scheme such as javascript:alert(). Before the fix, URL validation was insufficient, which could allow arbitrary JavaScript execution if a user clicked on a malicious link. An attacker with high privileges could insert a link exploiting an insecure URL scheme, leading to execution of arbitrary JavaScript code, theft of sensitive data through phishing attacks, or modification of the user interface behavior. This vulnerability is fixed in 1.20.1.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0036,"percentile":0.30597,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-p5g4-v748-6fh8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02","tags":["x_refsource_MISC"]},{"url":"https://www.drupal.org/sa-contrib-2025-027","tags":[]}],"priority":{"score":9.5,"factors":[{"name":"EPSS percentile","points":6.12},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"amauric","affectedVersions":[{"vendor":"AmauriC","product":"tarteaucitron.js","versions":["< 1.20.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-07T15:38:25.383742Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"tarteaucitronjs","vulnerableRanges":["<1.20.1"],"patched":["1.20.1"],"from":["GHSA-p5g4-v748-6fh8"],"provenance":"source"},{"ecosystem":"Packagist:https://packages.drupal.org/8","package":"drupal/tacjs","vulnerableRanges":["<6.7.0"],"patched":["6.7.0"],"from":["DRUPAL-CONTRIB-2025-027"],"provenance":"source"}],"summary":{"text":"tarteaucitron.js, a cookie banner library from AmauriC, contains a URL validation flaw in which inputs are not filtered for insecure schemes such as javascript:, allowing malicious links to be stored. An attacker with high privileges, such as access to the site's source code or a CMS plugin, must get a user to click the injected link (user interaction required) to execute arbitrary JavaScript in that user's browser, enabling data theft through phishing or changes to the interface.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:08:46Z"},"euvd":{"id":"EUVD-2025-10040","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-1467","published":"2025-02-23","fixed":"1.17.0","kev":false,"link":{"from":"CVE-2025-1467","to":"CVE-2025-31476","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:tarteaucitronjs","fromFixed":"1.17.0","toFixed":"1.20.1","daysApart":43},{"kind":"same-code","provenance":"machine","files":["tarteaucitron.js","tarteaucitron.min.js"],"commits":["https://github.com/AmauriC/tarteaucitron.js/commit/12490579001d5caa187adcaecb01da570a12076b","https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02"],"basis":"shared file"}]}},{"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},{"cve":"CVE-2025-48939","published":"2025-07-03","fixed":"1.22.0","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-2026-22809","published":"2026-01-13","fixed":"1.29.0","kev":false},{"cve":"CVE-2026-49977","published":"2026-07-17","fixed":"1.33.0","kev":false,"link":{"from":"CVE-2025-31476","to":"CVE-2026-49977","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:https://packages.drupal.org/8:drupal/tacjs","fromFixed":"6.7.0","toFixed":"6.8.0","daysApart":466},{"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/24b5464400ae2ff1ad96a092c629b9d632b9cc93"],"basis":"shared file"}]}}],"package":"npm:tarteaucitronjs"}}