CVE-2025-31138

CVE-2025-31138 is a medium-severity security vulnerability in tarteaucitronjs (npm), affecting versions < 1.20.1. It is fixed in 1.20.1.

Summary

A vulnerability was identified in tarteaucitron.js, where user-controlled inputs for element dimensions (width and height) were not properly validated. This allowed an attacker with direct access to the site's source code or a CMS plugin to set values like 100%;height:100%;position:fixed;, potentially covering the entire viewport and facilitating clickjacking attacks.

Fix https://github.com/AmauriC/tarteaucitron.js/commit/25fcf828aaa55306ddc09cfbac9a6f8f126e2d07

The issue was resolved by enforcing strict validation and sanitization of user-provided CSS values to prevent unintended UI manipulation.

Impact

An attacker with high privileges could exploit this vulnerability to:

  • Overlay malicious UI elements on top of legitimate content,
  • Trick users into interacting with hidden elements (clickjacking),
  • Disrupt the intended functionality and accessibility of the website.

CVE-2025-31138 has a CVSS score of 5.5 (Medium). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.20.1); upgrading removes the vulnerable code path.

Affected versions

tarteaucitronjs (< 1.20.1)

Security releases

tarteaucitronjs → 1.20.1 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade tarteaucitronjs to 1.20.1 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-31138? CVE-2025-31138 is a medium-severity security vulnerability in tarteaucitronjs (npm), affecting versions < 1.20.1. It is fixed in 1.20.1.
  2. How severe is CVE-2025-31138? CVE-2025-31138 has a CVSS score of 5.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of tarteaucitronjs are affected by CVE-2025-31138? tarteaucitronjs (npm) versions < 1.20.1 is affected.
  4. Is there a fix for CVE-2025-31138? Yes. CVE-2025-31138 is fixed in 1.20.1. Upgrade to this version or later.
  5. Is CVE-2025-31138 exploitable, and should I be worried? Whether CVE-2025-31138 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-31138 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-31138? Upgrade tarteaucitronjs to 1.20.1 or later.

Other vulnerabilities in tarteaucitronjs

CVE-2026-22809CVE-2025-31476CVE-2025-31475CVE-2025-31138CVE-2025-1467

Stop the waste.
Protect your environment with Kodem.