The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-2020-36632

CVE-2020-36632: Flat_project Flat RCE Vulnerability

CVE-2020-36632 is a critical RCE vulnerability in Flat_project Flat caused by prototype pollution in the unflatten function. This article covers technical details, affected versions up to 5.0.0, and mitigation.

Published: March 11, 2026

CVE-2020-36632 Overview

A critical prototype pollution vulnerability was discovered in the hughsk flat package up to version 5.0.0. This vulnerability affects the unflatten function within the index.js file, allowing attackers to manipulate JavaScript object prototypes through improperly controlled modification of object prototype attributes. The attack can be initiated remotely without authentication, potentially leading to denial of service, remote code execution, or property injection across all objects in the application.

Critical Impact

This prototype pollution vulnerability enables remote attackers to inject malicious properties into JavaScript object prototypes via the unflatten function, potentially compromising the entire application's object inheritance chain and enabling further exploitation vectors.

Affected Products

  • flat_project flat versions up to 5.0.0
  • Applications using the flat npm package for flattening/unflattening nested JavaScript objects
  • Node.js applications with direct or transitive dependencies on vulnerable flat versions

Discovery Timeline

  • 2022-12-25 - CVE CVE-2020-36632 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-36632

Vulnerability Analysis

The vulnerability exists in the unflatten function of the flat package, a popular Node.js library used to flatten and unflatten nested JavaScript objects. When processing specially crafted input containing prototype pollution payloads (such as __proto__ or constructor.prototype), the function fails to properly sanitize object keys before assigning values.

This prototype pollution flaw (CWE-1321) allows an attacker to inject arbitrary properties into Object.prototype, which then propagates to all JavaScript objects in the application. The impact is significant because:

  1. The vulnerability is exploitable remotely through any application endpoint that processes user-controlled data using the unflatten function
  2. No authentication or special privileges are required to trigger the vulnerability
  3. Successful exploitation can lead to denial of service, authentication bypass, or in some cases, remote code execution depending on how the application uses the polluted properties

Root Cause

The root cause lies in insufficient validation of object keys during the unflattening process. The unflatten function recursively builds nested objects from flattened key-value pairs (e.g., {"a.b.c": 1} becomes {a: {b: {c: 1}}}). When a key contains __proto__ or similar prototype chain references, the function directly assigns values to these properties without sanitization, allowing pollution of the base Object.prototype.

Attack Vector

The attack is network-based and can be executed remotely without any user interaction or authentication. An attacker crafts a malicious JSON object with keys like __proto__.polluted or constructor.prototype.polluted and sends it to an application endpoint that processes this data using the vulnerable unflatten function.

The vulnerability mechanism works by passing crafted input to the unflatten function. When input containing keys like __proto__.isAdmin with a value of true is processed, the function fails to sanitize the prototype reference in the key. As a result, the isAdmin property is assigned to Object.prototype, causing all subsequently created objects to inherit this polluted property. For detailed technical analysis, see the GitHub Issue #105 which documents the vulnerability.

Detection Methods for CVE-2020-36632

Indicators of Compromise

  • Presence of flat package version 5.0.0 or earlier in package.json or package-lock.json files
  • Unexpected properties appearing on JavaScript objects that weren't explicitly set
  • Application behavior changes or crashes related to prototype chain corruption
  • Log entries showing unusual object property access patterns

Detection Strategies

  • Run npm audit or yarn audit to identify vulnerable flat package versions in your dependency tree
  • Use static analysis tools like Snyk, npm-audit, or GitHub Dependabot to scan for CVE-2020-36632
  • Implement runtime monitoring for prototype pollution attacks by freezing Object.prototype in test environments
  • Review application code for usage of the unflatten function with untrusted input

Monitoring Recommendations

  • Enable dependency vulnerability scanning in CI/CD pipelines to catch vulnerable package versions
  • Monitor application logs for unexpected property access errors that may indicate prototype pollution
  • Implement Content Security Policy (CSP) headers to limit impact if prototype pollution leads to XSS
  • Set up alerts for npm security advisories related to the flat package

How to Mitigate CVE-2020-36632

Immediate Actions Required

  • Upgrade the flat package to version 5.0.1 or later immediately
  • Run npm update flat or yarn upgrade flat to update the package
  • Audit applications for direct and transitive dependencies on vulnerable versions using npm ls flat
  • Review all code paths where unflatten processes user-controlled input

Patch Information

The vulnerability is addressed in flat version 5.0.1. The fix was implemented in commit 20ef0ef55dfa028caddaedbcb33efbdb04d18e13. The patch adds proper sanitization of object keys to prevent prototype pollution through __proto__ and similar prototype chain references. For details, see the GitHub Commit Reference and GitHub Pull Request #106. The patched version is available at GitHub Release 5.0.1.

Workarounds

  • Validate and sanitize all user input before passing to the unflatten function, rejecting keys containing __proto__, constructor, or prototype
  • Freeze Object.prototype using Object.freeze(Object.prototype) to prevent modification, though this may break some legitimate functionality
  • Use the safe-flat alternative package or implement custom unflattening logic with proper key sanitization
  • Implement input validation middleware to block prototype pollution payloads at the application boundary
bash
# Configuration example
# Update flat package to patched version
npm update flat

# Verify installed version
npm ls flat

# Alternative: Force update to specific version
npm install flat@5.0.1

# Audit dependencies for vulnerabilities
npm audit

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechFlat Project

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.78%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-1321
  • Technical References
  • GitHub Issue #105

  • GitHub Release 5.0.1

  • VulDB #216777

  • VulDB #216777
  • Vendor Resources
  • GitHub Commit Reference

  • GitHub Pull Request #106
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE 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