Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-31865: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in elysiajs elysia

0
Medium
VulnerabilityCVE-2026-31865cvecve-2026-31865cwe-1321
Published: Wed Mar 18 2026 (03/18/2026, 02:50:55 UTC)
Source: CVE Database V5
Vendor/Project: elysiajs
Product: elysia

Description

Elysia is a Typescript framework for request validation, type inference, OpenAPI documentation, and client-server communication. Prior to version 1.4.27, an Elysia cookie can be overridden by prototype pollution , eg. `__proto__`. This issue is patched in 1.4.27. As a workaround, use t.Cookie validation to enforce validation value and/or prevent iterable over cookie if possible.

AI-Powered Analysis

AILast updated: 03/18/2026, 03:44:50 UTC

Technical Analysis

CVE-2026-31865 is a medium-severity prototype pollution vulnerability affecting the Elysia Typescript framework, a tool used for request validation, type inference, OpenAPI documentation, and client-server communication. The vulnerability arises from improper control over modification of object prototype attributes (CWE-1321), specifically allowing an attacker to override cookie objects by injecting or manipulating the __proto__ property. This can lead to unexpected behavior in the application, such as altering cookie values or application state, potentially compromising confidentiality and integrity. The flaw exists in all Elysia versions prior to 1.4.27 and is exploitable remotely without authentication or user interaction, increasing its risk profile. Although no known exploits are currently reported in the wild, the vulnerability is significant due to the widespread use of Elysia in Typescript-based web applications. The recommended fix is upgrading to version 1.4.27 or later, where the issue is patched. As a temporary mitigation, developers can enforce strict cookie validation using t.Cookie validation to prevent iterable access or prototype pollution attacks on cookies. This vulnerability highlights the risks of prototype pollution in JavaScript frameworks, which can lead to subtle but impactful security issues.

Potential Impact

The primary impact of this vulnerability is on the confidentiality and integrity of application data, specifically cookie values managed by the Elysia framework. An attacker exploiting this flaw can manipulate prototype attributes to override cookie objects, potentially leading to unauthorized access, session manipulation, or bypass of security controls relying on cookie data. While availability is not directly affected, the integrity compromise can facilitate further attacks or data leakage. Since exploitation requires no authentication or user interaction and can be performed remotely, the vulnerability poses a moderate risk to any organization using vulnerable Elysia versions. Applications relying heavily on cookies for authentication or state management are particularly at risk. The scope includes all web applications using Elysia versions before 1.4.27, which may be significant given the framework's adoption in Typescript web development. Although no active exploits are reported, the ease of exploitation and potential for chaining with other vulnerabilities make timely remediation important.

Mitigation Recommendations

1. Upgrade all Elysia framework instances to version 1.4.27 or later immediately to apply the official patch addressing prototype pollution. 2. Implement strict validation on cookies using t.Cookie validation or equivalent mechanisms to enforce allowed values and prevent iterable or prototype property manipulation. 3. Review application code for any direct or indirect use of __proto__ or other prototype properties in cookie handling or request processing and refactor to avoid unsafe prototype modifications. 4. Employ runtime protections such as object freezing or sealing where feasible to prevent prototype pollution attacks. 5. Conduct thorough security testing, including fuzzing and static analysis, focused on prototype pollution vectors in the application. 6. Monitor application logs for unusual cookie or prototype-related activity that may indicate attempted exploitation. 7. Educate developers on the risks of prototype pollution and secure coding practices in JavaScript/Typescript frameworks. 8. Consider implementing Content Security Policy (CSP) and other web security headers to reduce attack surface. These steps combined will reduce the risk of exploitation and limit the impact if an attack occurs.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-09T19:02:25.013Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69ba1bd6771bdb17491a1d53

Added to database: 3/18/2026, 3:28:22 AM

Last enriched: 3/18/2026, 3:44:50 AM

Last updated: 3/19/2026, 6:39:20 AM

Views: 15

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses