GHSA-q5f6-qxm2-mcqm
MEDIUMtarteaucitron.js has Regular Expression Denial of Service (ReDoS) vulnerability
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
tarteaucitronjsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
Summary
A potential Regular Expression Denial of Service (ReDoS) vulnerability was identified in tarteaucitron.js in the handling of the issuu_id parameter.
Details
The issue was caused by the use of insufficiently constrained regular expressions applied to attacker-controlled input:
if (issuu_id.match(/\d+\/\d+/)) {
issuu_embed = '#' + issuu_id;
} else if (issuu_id.match(/d=(.*)&u=(.*)/)) {
issuu_embed = '?' + issuu_id;
}
These expressions are not anchored and rely on greedy patterns (.*). When evaluated against specially crafted input, they may cause excessive backtracking, leading to high CPU consumption and potential denial of service.
Impact
An attacker able to control the issuu_id parameter could exploit this vulnerability to degrade performance or cause temporary service unavailability through CPU exhaustion.
No confidentiality or integrity impact was identified.
Fix https://github.com/AmauriC/tarteaucitron.js/commit/f0bbdac2fdf3cd24a325fc0928c0d34abf1b7b52
The logic was simplified and hardened by removing ambiguous regular expressions and enforcing strict input validation:
if (issuu_id.match(/^\d+\/\d+$/)) {
issuu_embed = '#' + issuu_id;
} else {
issuu_embed = '?' + issuu_id;
}
This change eliminates the risk of catastrophic backtracking and prevents ReDoS conditions.
Additionally, code related to the legacy "Alexa Rank" service was removed. This service, historically provided by Alexa.com via browser toolbars and popularity rankings, has been deprecated for several years and is no longer operational. The Alexa domain is now exclusively associated with the Amazon voice assistant, and the original ranking service has been permanently discontinued.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | tarteaucitronjs | all versions | 1.29.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for tarteaucitronjs. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update tarteaucitronjs to 1.29.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-q5f6-qxm2-mcqm is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-q5f6-qxm2-mcqm is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-q5f6-qxm2-mcqm. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-q5f6-qxm2-mcqm in your dependencies?
O3 detects GHSA-q5f6-qxm2-mcqm across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.