{"id":"CVE-2025-31476","aliases":["DRUPAL-CONTRIB-2025-027","EUVD-2025-10040","GHSA-p5g4-v748-6fh8"],"status":"published","title":"tarteaucitron.js allows url scheme injection via unfiltered inputs","description":"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.","severity":{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.0036,"percentile":0.30052,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2025-04-02T17:01:45Z","modified":"2026-10-28T02:30:33Z","fixes":[{"ecosystem":"npm","package":"tarteaucitronjs","fixed_in":["1.20.1"],"sources":["ghsa","osv"]},{"ecosystem":"Packagist:https://packages.drupal.org/8","package":"drupal/tacjs","fixed_in":["6.7.0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"tarteaucitronjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.20.1"}]}]},{"source":"osv","ecosystem":"Packagist:https://packages.drupal.org/8","package":"drupal/tacjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.7.0"}]}]},{"source":"osv","ecosystem":"npm","package":"tarteaucitronjs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.20.1"}]}]}],"products":[{"vendor":"amauri","product":"tarteaucitronjs"},{"vendor":"amauric","product":"tarteaucitron.js"},{"vendor":"tacjs_project","product":"tacjs"}],"references":[{"url":"https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-p5g4-v748-6fh8","tags":["x_refsource_CONFIRM","Third Party Advisory","advisory","web"]},{"url":"https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://www.drupal.org/sa-contrib-2025-027","tags":["Vendor Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-31476","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-p5g4-v748-6fh8"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31476.json","tags":["advisory"]},{"url":"https://github.com/AmauriC/tarteaucitron.js","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-31476","title":"tarteaucitron.js allows url scheme injection via unfiltered inputs","description":"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.","status":"published","published":"2025-04-07T14:52:12.728Z","modified":"2025-06-12T21:03:38.7Z","cvss":[{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:32:44.11109Z"}],"euvd":[{"id":"EUVD-2025-10040","description":"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.","status":"published","published":"2025-04-07T14:52:12Z","modified":"2025-06-12T21:03:38Z","cvss":[{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T20:32:24.065864Z"}],"ghsa":[{"id":"GHSA-p5g4-v748-6fh8","title":"tarteaucitron.js allows url scheme injection via unfiltered inputs","description":"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.\n\n## Impact\nAn attacker with high privileges could insert a link exploiting an insecure URL scheme, leading to:\n- Execution of arbitrary JavaScript code\n- Theft of sensitive data through phishing attacks\n- Modification of the user interface behavior\n\n## Fix https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02\nThe issue was resolved by enforcing strict URL validation, ensuring that they start with `http://` or `https://` before being used.","status":"published","published":"2025-04-07T16:46:57Z","modified":"2025-04-07T16:47:00Z","cvss":[{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:38:38.344711Z"}],"nvd":[{"id":"CVE-2025-31476","description":"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.","status":"published","published":"2025-04-07T15:15:44.37Z","modified":"2026-06-17T09:10:28.123Z","cvss":[{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:10:59.48027Z"}],"osv":[{"id":"CVE-2025-31476","title":"tarteaucitron.js allows url scheme injection via unfiltered inputs","description":"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.","status":"published","published":"2025-04-07T14:52:12.728Z","modified":"2026-10-28T02:30:33.010394664Z","cvss":[{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:44:48.02508Z"},{"id":"GHSA-p5g4-v748-6fh8","title":"tarteaucitron.js allows url scheme injection via unfiltered inputs","description":"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.\n\n## Impact\nAn attacker with high privileges could insert a link exploiting an insecure URL scheme, leading to:\n- Execution of arbitrary JavaScript code\n- Theft of sensitive data through phishing attacks\n- Modification of the user interface behavior\n\n## Fix https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02\nThe issue was resolved by enforcing strict URL validation, ensuring that they start with `http://` or `https://` before being used.","status":"published","published":"2025-04-07T16:46:57Z","modified":"2025-12-10T23:41:04.30478Z","cvss":[{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:52.534897Z"},{"id":"DRUPAL-CONTRIB-2025-027","description":"This module enables sites to comply with the European cookie law using tarteaucitron.js.\n\nThe module doesn't sufficiently filter user-supplied markup inside of content leading to a persistent Cross Site Scripting (XSS) vulnerability.\n\nThis vulnerability is mitigated by the fact that an attacker needs to be able to insert specific data attributes in the page.","status":"published","published":"2025-04-02T17:01:45Z","modified":"2026-09-10T03:46:04.502963779Z","updated_at":"2026-11-02T15:46:13.584509Z"}]}}
