Denosaurs emoji has ReDoS vulnerability in `replace` function
Description
The Denosaurs emoji package provides emojis for dinosaurs. Starting in version 0.1.0 and prior to version 0.3.0, the reTrimSpace regex has 2nd degree polynomial inefficiency, leading to a delayed response given a big payload. The issue has been patched in 0.3.0. As a workaround, avoid using the replace, unemojify, or strip functions.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The Denosaurs emoji package (0.1.0–0.2.9) contains a ReDoS in the `reTrimSpace` regex, causing denial of service via large payloads.
Vulnerability
The Denosaurs emoji package versions 0.1.0 up to (but not including) 0.3.0 contain a Regular Expression Denial of Service (ReDoS) vulnerability. The reTrimSpace regex exhibits 2nd-degree polynomial inefficiency, meaning that processing a specially crafted input string can cause the regex engine to take exponentially longer with increasing payload size [2]. The affected code path is reached through the replace, unemojify, or strip functions [1].
Exploitation
An attacker can provide a large, carefully crafted input string to one of the exposed functions (replace, unemojify, or strip). No special authentication or user interaction beyond invoking the vulnerable function is required; the attack is purely input-driven. The regex engine will enter a backtracking loop that results in a delayed response proportional to the square of the input length [2].
Impact
Successful exploitation leads to a denial of service (degraded availability) by causing the application to consume excessive CPU time or blocking the event loop. The attacker does not gain any ability to read, modify, or delete data; the impact is limited to availability [2].
Mitigation
The vulnerability is fixed in version 0.3.0, which removes the reTrimSpace regex in favor of the native trim() method [1]. Users should upgrade to version 0.3.0 or later. As a workaround, avoid using the replace, unemojify, or strip functions until the upgrade can be applied [2]. The issue is not known to be listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2- denosaurs/emojiv5Range: < 0.3.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/denosaurs/emoji/pull/11mitrex_refsource_MISC
- github.com/denosaurs/emoji/security/advisories/GHSA-w2xx-hjhp-gx5vmitrex_refsource_CONFIRM
- huntr.dev/bounties/444f2255-5085-466f-ba0e-5549fa8846a3/mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.