tarteaucitron.js allows prototype pollution via custom text injection

Description

A vulnerability was identified in tarteaucitron.js, where the addOrUpdate function, used for applying custom texts, did not properly validate input. This allowed an attacker with direct access to the site's source code or a CMS plugin to manipulate JavaScript object prototypes, leading to potential security risks such as data corruption or unintended code execution.

Impact

An attacker with high privileges could exploit this vulnerability to:
- Modify object prototypes, affecting core JavaScript behavior,
- Cause application crashes or unexpected behavior,
- Potentially introduce further security vulnerabilities depending on the application's architecture.

Fix https://github.com/AmauriC/tarteaucitron.js/commit/74c354c413ee3f82dff97a15a0a43942887c2b5b

The issue was resolved by ensuring that user-controlled inputs cannot modify JavaScript object prototypes.

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2025-04-07 16:38:52 UTC
Updated
2025-04-07 16:38:54 UTC
GitHub reviewed
2025-04-07 16:38:52 UTC
NVD published
2025-04-07

EPSS Score

Score Percentile
1.33% 79.64%

CVSS Scores

Base score Version Severity Vector
5.5 3.1
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.

Identifiers

CWEs

CWE id Name
CWE-1321 Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm tarteaucitronjs < 1.20.1 1.20.1

References

cvelogic Threat Intelligence