{"id":"CVE-2025-31476","aliases":["CVE-2025-31476","GHSA-p5g4-v748-6fh8","DRUPAL-CONTRIB-2025-027"],"related":[],"kind":"vulnerability","state":"published","title":"tarteaucitron.js allows url scheme injection via unfiltered inputs","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.","format":"markdown","source":"drupal"},{"lang":"es","text":"tarteaucitron.js es un banner de cookies compatible y accesible. Se identificó una vulnerabilidad en tarteaucitron.js que permitía a un usuario con privilegios elevados (acceso al código fuente del sitio o a un complemento de CMS) introducir una URL con un esquema inseguro como javascript:alert(). Antes de la corrección, la validación de URL era insuficiente, lo que podía permitir la ejecución arbitraria de JavaScript si un usuario hacía clic en un enlace malicioso. Un atacante con privilegios elevados podría insertar un enlace aprovechando un esquema de URL inseguro, lo que provocaría la ejecución de código JavaScript arbitrario, el robo de datos confidenciales mediante ataques de phishing o la modificación del comportamiento de la interfaz de usuario. Esta vulnerabilidad se corrigió en la versión 1.20.1.","source":"nvd"}],"published":"2025-04-02T17:01:45.000Z","modified":"2026-09-10T03:46:04.502Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 1.20.1","status":"affected"}],"vendor":"AmauriC","product":"tarteaucitron.js","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.20.1"}],"ecosystem":"npm","package":"tarteaucitronjs","purl":"pkg:npm/tarteaucitronjs","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.7.0"}],"ecosystem":"Packagist:https://packages.drupal.org/8","package":"drupal/tacjs","purl":"pkg:composer/drupal/tacjs?repository_url=https:%2F%2Fpackages.drupal.org%2F8","source":"drupal"},{"ranges":[{"status":"affected","fixed":"1.20.1"}],"vendor":"amauri","product":"tarteaucitronjs","cpe":"cpe:2.3:a:amauri:tarteaucitronjs:*:*:*:*:*:node.js:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"8.x-1.0","fixed":"8.x-6.7"}],"vendor":"tacjs_project","product":"tacjs","cpe":"cpe:2.3:a:tacjs_project:tacjs:*:*:*:*:*:drupal:*:*","source":"nvd"}],"references":[{"url":"https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-p5g4-v748-6fh8","tags":["third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.drupal.org/sa-contrib-2025-027","tags":["vendor-advisory","web"],"sources":["cvelist","drupal","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-31476","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/AmauriC/tarteaucitron.js","tags":["package"],"sources":["ghsa"]}],"credits":["Pierre Rudloff (prudloff)"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-07T15:38:25.383Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-31476","url":"https://www.cve.org/CVERecord?id=CVE-2025-31476","licence":"CVE Terms of Use","modified":"2025-06-12T21:03:38.700Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p5g4-v748-6fh8","url":"https://github.com/advisories/GHSA-p5g4-v748-6fh8","licence":"CC-BY-4.0","modified":"2025-12-10T23:41:04.304Z"},{"source":"drupal","name":"Drupal Security Team","id":"DRUPAL-CONTRIB-2025-027","url":"https://osv.dev/vulnerability/DRUPAL-CONTRIB-2025-027","licence":"MIT","modified":"2026-09-10T03:46:04.502Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-31476","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-31476","licence":"Public domain","modified":"2026-06-17T09:10:28.123Z"}],"updatedAt":"2026-11-25T22:58:56.156Z","epss":{"score":0.0036,"percentile":0.31846,"date":"2026-12-01T12:00:22.000Z"}}