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
    • 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-42040

CVE-2026-42040: Axios Null Byte Encoding Vulnerability

CVE-2026-42040 is a null byte encoding flaw in Axios HTTP client affecting versions prior to 1.15.1 and 0.31.1. The vulnerability reverses safe percent-encoding of null bytes. This article covers technical details, impact, and patches.

Published: April 30, 2026

CVE-2026-42040 Overview

CVE-2026-42040 is an improper output encoding vulnerability affecting Axios, a widely-used promise-based HTTP client for both browser and Node.js environments. The vulnerability exists in the encode() function within lib/helpers/AxiosURLSearchParams.js, where a character mapping (charMap) inadvertently reverses the safe percent-encoding of null bytes. After encodeURIComponent('\\x00') correctly produces the safe sequence %00, the charMap entry '%00': '\\x00' converts it back to a raw null byte, potentially allowing attackers to inject null bytes into URL parameters under specific conditions.

Critical Impact

Applications using Axios's AxiosURLSearchParams helper directly may be vulnerable to null byte injection attacks, though the standard axios request flow is not affected.

Affected Products

  • Axios versions prior to 1.15.1
  • Axios versions prior to 0.31.1
  • Axios for Node.js (all platforms)

Discovery Timeline

  • 2026-04-24 - CVE CVE-2026-42040 published to NVD
  • 2026-04-27 - Last updated in NVD database

Technical Details for CVE-2026-42040

Vulnerability Analysis

This vulnerability falls under CWE-116: Improper Encoding or Escaping of Output. The core issue lies in the character mapping implementation within the AxiosURLSearchParams helper class. While the vulnerability requires specific conditions to exploit—namely direct usage of the affected encoding helper rather than standard Axios request methods—it represents a design flaw in how URL parameters are processed.

The vulnerability has a network-based attack vector but requires high attack complexity to exploit successfully. Authentication is not required, and no user interaction is needed. The impact is limited to integrity concerns with no confidentiality or availability impact, as the standard axios request flow remains unaffected by this encoding issue.

Root Cause

The root cause is an improper character mapping configuration in the charMap object at line 21 of lib/helpers/AxiosURLSearchParams.js. The mapping contains an entry '%00': '\\x00' that explicitly reverses the percent-encoding of null bytes. When encodeURIComponent() correctly encodes a null byte character (\\x00) to its safe representation (%00), the subsequent character mapping transformation converts it back to the raw null byte character. This defeats the purpose of the initial encoding step and creates an opportunity for null byte injection in specific usage scenarios.

Attack Vector

The attack vector is network-based but limited in scope. An attacker would need to craft malicious input containing null byte characters that gets processed through the AxiosURLSearchParams.encode() function. The exploitation requires:

  1. The target application must use the AxiosURLSearchParams helper directly rather than standard Axios request methods
  2. User-controlled input must be passed through the vulnerable encoding function
  3. The downstream system must be susceptible to null byte injection attacks

The vulnerability mechanism involves the improper character mapping that reverses null byte encoding. When the encode() function processes input containing null bytes, the charMap transformation converts properly encoded %00 sequences back to raw \\x00 characters. For detailed technical information, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-42040

Indicators of Compromise

  • Unusual null byte characters appearing in HTTP request parameters or URLs
  • Application logs showing malformed URL encoding sequences
  • Backend systems receiving unexpected raw null bytes in query parameters

Detection Strategies

  • Perform dependency scanning to identify vulnerable Axios versions prior to 1.15.1 or 0.31.1
  • Monitor application code for direct usage of AxiosURLSearchParams helper class
  • Implement input validation checks for null byte characters in user-supplied data

Monitoring Recommendations

  • Enable verbose logging for URL parameter processing in affected applications
  • Set up alerts for package manifest files containing outdated Axios versions
  • Monitor software composition analysis (SCA) tools for this vulnerability

How to Mitigate CVE-2026-42040

Immediate Actions Required

  • Upgrade Axios to version 1.15.1 or later for the 1.x branch
  • Upgrade Axios to version 0.31.1 or later for the 0.x branch
  • Audit application code for direct usage of AxiosURLSearchParams encoding functions
  • Implement input sanitization to filter null byte characters before URL parameter encoding

Patch Information

The vulnerability has been patched in Axios versions 1.15.1 and 0.31.1. The fix removes the problematic charMap entry that was reversing the null byte encoding. Users should update their Axios dependency to the latest patched version immediately. For complete patch details, see the GitHub Security Advisory.

Workarounds

  • Avoid direct usage of the AxiosURLSearchParams helper class until patched
  • Implement custom input sanitization to strip null bytes before encoding
  • Use standard Axios request methods which are not affected by this vulnerability
bash
# Update Axios to patched version
npm update axios@1.15.1

# Or for yarn users
yarn upgrade axios@1.15.1

# Verify installed version
npm list axios

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechAxios

  • SeverityLOW

  • CVSS Score3.7

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-116
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-42035: Axios HTTP Client Prototype Pollution

  • CVE-2026-42037: Axios HTTP Client Header Injection Flaw

  • CVE-2024-57965: Axios Origin Validation Vulnerability

  • CVE-2026-42041: Axios Auth Bypass 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