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-2021-23406

CVE-2021-23406: Pac-resolver Information Disclosure Flaw

CVE-2021-23406 is an information disclosure vulnerability in Pac-resolver that occurs with untrusted input due to unsafe PAC file handling. This article covers the technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-23406 Overview

CVE-2021-23406 is a remote code execution vulnerability affecting the pac-resolver Node.js package before version 5.0.0. This vulnerability occurs when the package processes untrusted input due to unsafe PAC (Proxy Auto-Config) file handling. The pac-resolver package is widely used in Node.js applications to resolve proxy configurations automatically, making this vulnerability particularly concerning for applications that process PAC files from external or untrusted sources.

The fix for this vulnerability was applied in the node-degenerator library, a dependency written by the same maintainer, which highlights how supply chain dependencies can propagate security issues through the Node.js ecosystem.

Critical Impact

Attackers can achieve remote code execution by supplying a malicious PAC file to applications using vulnerable versions of pac-resolver, potentially leading to complete system compromise.

Affected Products

  • pac-resolver versions prior to 5.0.0
  • Node.js applications using pac-resolver as a dependency
  • Java applications using org.webjars.npm:pac-resolver

Discovery Timeline

  • 2021-08-24 - CVE CVE-2021-23406 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-23406

Vulnerability Analysis

The vulnerability exists in how pac-resolver handles PAC files, which are JavaScript files used to determine proxy settings for web requests. PAC files contain a FindProxyForURL function that returns proxy configuration based on the requested URL. The unsafe handling of these files allows for arbitrary code execution when processing untrusted PAC content.

The pac-resolver package relies on the node-degenerator library to transform synchronous JavaScript code into asynchronous code. The vulnerability stems from insufficient sandboxing when evaluating PAC file code, allowing attackers to escape the intended execution context and execute arbitrary JavaScript code on the server.

Root Cause

The root cause lies in the improper sandboxing of JavaScript execution when processing PAC files. The node-degenerator library uses the vm2 library for sandboxed execution, but the implementation had gaps that allowed code to escape the sandbox. Specifically, the handling of the filename option and promise return values were not properly secured, enabling attackers to inject malicious code that would execute outside the sandboxed environment.

Attack Vector

An attacker can exploit this vulnerability by crafting a malicious PAC file and having a vulnerable application process it. This can occur in scenarios such as:

  1. Applications that accept PAC file URLs from user input
  2. Man-in-the-middle attacks where an attacker intercepts and modifies PAC file responses
  3. Compromised PAC file hosting servers

The attack requires network access to deliver the malicious PAC file to the target application. Once the vulnerable application parses the malicious PAC file, the attacker's code executes with the privileges of the Node.js process.

typescript
// Security patch in node-degenerator src/index.ts - Fix `filename` option
// Source: https://github.com/TooTallNate/node-degenerator/commit/9d25bb67d957bc2e5425fea7bf7a58b3fc64ff9e

 import { parseScript } from 'esprima';
 import { visit, namedTypes as n, builders as b } from 'ast-types';
 import { Context, RunningScriptOptions } from 'vm';
-import { VM } from 'vm2';
+import { VM, VMScript } from 'vm2';

 /**
  * Compiles sync JavaScript code into JavaScript with async Functions.

Source: GitHub Commit - node-degenerator filename fix

typescript
// Security patch in node-degenerator src/index.ts - Fix return `undefined`
// Source: https://github.com/TooTallNate/node-degenerator/commit/ccc3445354135398b6eb1a04c7d27c13b833f2d5

 		const r = function (this: any, ...args: A): Promise<R> {
 			try {
 				const p = fn.apply(this, args);
-				if (typeof p.then === 'function') {
+				if (typeof p?.then === 'function') {
 					return p;
 				}
 				return Promise.resolve(p);

Source: GitHub Commit - node-degenerator undefined return fix

Detection Methods for CVE-2021-23406

Indicators of Compromise

  • Unexpected child processes spawned by Node.js applications using pac-resolver
  • Unusual network connections originating from proxy resolution processes
  • Anomalous file system access patterns from applications processing PAC files
  • Error logs indicating malformed or suspicious PAC file content

Detection Strategies

  • Audit package.json and package-lock.json files for pac-resolver versions below 5.0.0
  • Use dependency scanning tools like npm audit or Snyk to identify vulnerable packages
  • Monitor application logs for errors related to PAC file parsing or vm2 sandbox escapes
  • Implement Software Composition Analysis (SCA) in CI/CD pipelines to detect vulnerable dependencies

Monitoring Recommendations

  • Enable verbose logging for applications that process PAC files
  • Monitor process execution chains for unexpected command execution
  • Implement network monitoring for outbound connections from Node.js processes
  • Set up alerts for dependency updates in affected packages

How to Mitigate CVE-2021-23406

Immediate Actions Required

  • Update pac-resolver to version 5.0.0 or later immediately
  • Update node-degenerator to the patched version containing the security fixes
  • Audit all applications using pac-resolver for exposure to untrusted PAC files
  • Consider restricting PAC file sources to trusted origins only

Patch Information

The vulnerability is fixed in pac-resolver version 5.0.0 and later. The actual security fixes were implemented in the node-degenerator dependency. Organizations should update their Node.js applications to use the patched versions. For detailed patch information, see the pac-resolver v5.0.0 release notes and review the security commits in the node-degenerator repository.

Workarounds

  • Avoid processing PAC files from untrusted or user-controlled sources
  • Implement strict input validation for any PAC file URLs accepted by applications
  • Consider using allow-lists for permitted PAC file sources
  • Deploy network-level controls to prevent PAC file requests to untrusted domains
bash
# Update pac-resolver to patched version
npm update pac-resolver

# Or explicitly install the fixed version
npm install pac-resolver@^5.0.0

# Run npm audit to verify the vulnerability is resolved
npm audit

# For yarn users
yarn upgrade pac-resolver@^5.0.0
yarn audit

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

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechPac Resolver

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability1.00%

  • 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
  • NVD-CWE-noinfo
  • Vendor Resources
  • GitHub Commit Changes

  • GitHub Commit Changes

  • GitHub Release v5.0.0

  • Snyk Java Vulnerability

  • Snyk JavaScript Vulnerability
  • Latest CVEs
  • CVE-2025-11419: Keycloak TLS DoS Vulnerability

  • CVE-2025-13947: WebKitGTK Information Disclosure Flaw

  • CVE-2026-40322: SiYuan Knowledge Management RCE Vulnerability

  • CVE-2026-40318: SiYuan Path Traversal 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