Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-31865

CVE-2026-31865: Elysia Prototype Pollution Vulnerability

CVE-2026-31865 is a prototype pollution vulnerability in Elysia TypeScript framework that allows cookies to be overridden via __proto__. This article covers the technical details, affected versions, and mitigation strategies.

Published: March 20, 2026

CVE-2026-31865 Overview

CVE-2026-31865 is a prototype pollution vulnerability affecting Elysia, a popular TypeScript framework used for request validation, type inference, OpenAPI documentation, and client-server communication. Prior to version 1.4.27, Elysia cookies can be overridden through prototype pollution using properties like __proto__. This vulnerability allows attackers to manipulate cookie values and potentially bypass security controls implemented through cookie-based authentication or session management.

Critical Impact

Attackers can exploit prototype pollution to override cookie values, potentially leading to authentication bypass, session hijacking, or unauthorized access to user data through manipulated cookie properties.

Affected Products

  • Elysia versions prior to 1.4.27
  • Applications using Elysia's cookie handling functionality without explicit t.Cookie validation
  • Web services relying on Elysia's default cookie iteration behavior

Discovery Timeline

  • 2026-03-18 - CVE CVE-2026-31865 published to NVD
  • 2026-03-18 - Last updated in NVD database

Technical Details for CVE-2026-31865

Vulnerability Analysis

This vulnerability stems from improper handling of object initialization in Elysia's cookie management system. The framework's cookie constructor used a default empty object {} for initialization, which inherits from Object.prototype. This design flaw allows attackers to inject malicious properties through prototype pollution vectors such as __proto__, effectively overriding legitimate cookie values.

When an application iterates over cookies or accesses cookie properties, the polluted prototype chain can inject unexpected values, allowing attackers to manipulate authentication states, session identifiers, or other security-sensitive cookie data.

Root Cause

The root cause lies in the ElysiaCookie constructor within src/cookies.ts. The initial parameter was defined as private initial: Partial<ElysiaCookie> = {}, which creates an object that inherits from Object.prototype. This inheritance chain allows prototype pollution attacks where malicious __proto__ properties can cascade into cookie operations.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can craft malicious HTTP requests containing prototype pollution payloads in cookie-related parameters. When Elysia processes these requests, the polluted prototype properties are inherited by the cookie object, allowing the attacker to:

  1. Override existing cookie values
  2. Inject arbitrary properties into the cookie object
  3. Bypass cookie-based validation or authentication checks
  4. Potentially access other users' session data through cookie manipulation
typescript
// Security patch in src/cookies.ts
	constructor(
		private name: string,
		private jar: Record<string, ElysiaCookie>,
-		private initial: Partial<ElysiaCookie> = {}
+		private initial: Partial<ElysiaCookie> = Object.create(null)
	) {}

	get cookie() {

Source: GitHub Commit Report

The fix replaces {} with Object.create(null), which creates an object with no prototype chain, effectively preventing prototype pollution attacks.

Detection Methods for CVE-2026-31865

Indicators of Compromise

  • Unusual HTTP requests containing __proto__, constructor, or prototype strings in cookie headers or request bodies
  • Unexpected cookie values appearing in application logs that don't match user input
  • Authentication anomalies where users gain access to unauthorized resources
  • Session inconsistencies where cookie-based state appears corrupted or manipulated

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect and block requests containing prototype pollution patterns (__proto__, constructor.prototype)
  • Monitor application logs for cookie-related errors or unexpected property access
  • Deploy runtime application self-protection (RASP) to detect prototype pollution attempts
  • Use static analysis tools to identify vulnerable Elysia versions in your dependency tree

Monitoring Recommendations

  • Enable detailed logging for cookie handling operations in Elysia applications
  • Set up alerts for suspicious patterns in HTTP headers containing prototype pollution keywords
  • Monitor for unusual authentication events or session anomalies that could indicate cookie manipulation
  • Implement dependency scanning in CI/CD pipelines to detect vulnerable Elysia versions

How to Mitigate CVE-2026-31865

Immediate Actions Required

  • Upgrade Elysia to version 1.4.27 or later immediately
  • Audit applications for any custom cookie handling that may be similarly vulnerable
  • Implement t.Cookie validation to enforce strict cookie value validation
  • Review authentication and session management code for prototype pollution susceptibility

Patch Information

The vulnerability is patched in Elysia version 1.4.27. The fix modifies the cookie constructor to use Object.create(null) instead of an empty object literal, eliminating the prototype chain that enables this attack. The patch can be reviewed in the GitHub commit and the GitHub Security Advisory provides additional details.

Workarounds

  • Use t.Cookie validation to enforce strict validation of cookie values and prevent prototype pollution
  • Implement input sanitization to filter out prototype pollution vectors (__proto__, constructor, prototype) from user input
  • Avoid iterating over cookies directly; use explicit property access with validated keys
  • Consider implementing a custom cookie parser that uses Object.create(null) for cookie storage
bash
# Update Elysia to patched version
npm update elysia@1.4.27

# Or install specific version
npm install elysia@^1.4.27

# Verify installed version
npm list elysia

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeOther

  • Vendor/TechElysia

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-1321
  • Technical References
  • GitHub Commit Report

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-30837: Elysia TypeScript Framework DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English