All reports
Medium

tarteaucitron.js allows url scheme injection via unfiltered inputs

Affected versions

Affected versions
<6.7.0
Fixed version
6.7.0
Affected versions
< 1.20.1
Fixed version
1.20.1

Exploitation

CVE-2025-31476

Probability of exploitation in the next 30 days: 0.36%

FIRST EPSS · 2026-11-18

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.

Impact

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

  • Modification of the user interface behavior

Fix https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02

The issue was resolved by enforcing strict URL validation, ensuring that they start with http:// or https:// before being used.

Links

Credits

  • Rudloff
  • Pierre Rudloff (prudloff)

Data rights and licenses

Drupal Security Team

Copyright (c) 2025 Ackama

The MIT License (MIT) Copyright (c) 2025 Ackama Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

License terms