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-2022-25757

CVE-2022-25757: Apache APISIX Auth Bypass Vulnerability

CVE-2022-25757 is an authentication bypass vulnerability in Apache APISIX that exploits duplicate JSON keys to evade validation. This article covers the technical details, affected versions, and mitigation strategies.

Published: February 17, 2026

CVE-2022-25757 Overview

CVE-2022-25757 is an Improper Input Validation vulnerability in Apache APISIX before version 2.13.0. When decoding JSON with duplicate keys, the lua-cjson library used by APISIX chooses the last occurred value as the result. This behavior discrepancy allows attackers to bypass the body_schema validation in the request-validation plugin by passing JSON payloads with duplicate keys, effectively hiding malicious input from validation checks while delivering it to upstream applications that process JSON differently.

Critical Impact

Attackers can bypass request validation controls to inject malicious payloads into upstream applications, potentially leading to unauthorized access, data manipulation, or complete system compromise depending on the upstream application's functionality.

Affected Products

  • Apache APISIX version 2.12.1 and prior versions
  • Systems using body_schema validation in the request-validation plugin
  • Deployments where upstream applications use JSON libraries that choose the first occurred value (e.g., jsoniter, gojay)

Discovery Timeline

  • 2022-03-28 - CVE-2022-25757 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-25757

Vulnerability Analysis

This vulnerability exploits a fundamental inconsistency in how different JSON parsing libraries handle duplicate keys within JSON objects. The JSON specification (RFC 8259) states that object member names "SHOULD be unique" but does not mandate uniqueness, leaving the behavior for duplicate keys implementation-dependent. Apache APISIX uses lua-cjson for JSON parsing, which selects the last occurrence of a duplicate key when constructing the parsed object.

When an attacker submits a JSON payload with duplicate keys, APISIX validates the payload using the last value (which passes validation), while upstream applications using different JSON libraries may process the first value instead. This creates a validation bypass where malicious content in the first occurrence escapes security checks but reaches the application for processing.

Root Cause

The root cause is the inconsistent handling of duplicate JSON keys between the APISIX gateway's lua-cjson library and upstream application JSON parsers. Since lua-cjson selects the last value for duplicate keys during validation, but certain upstream JSON libraries (such as jsoniter or gojay in Go applications) select the first value, the validated and processed values differ. This semantic mismatch creates a TOCTOU-like vulnerability where the time-of-check (validation) and time-of-use (processing) operate on different interpretations of the same payload.

Attack Vector

The attack requires network access to the APISIX gateway and exploits the validation bypass through crafted HTTP requests. An attacker constructs a JSON payload where the first occurrence of a key contains malicious data that would normally be rejected by validation, while the second (duplicate) occurrence contains benign data that passes validation.

For example, an attacker could submit a payload like {"string_payload":"bad","string_payload":"good"}. APISIX validates against "good" (last value) and permits the request, but an upstream application using jsoniter processes "bad" (first value). This allows the attacker to bypass input validation entirely for systems meeting three conditions: using body_schema validation, having upstream applications with first-value JSON parsers, and lacking secondary input validation at the application layer.

Detection Methods for CVE-2022-25757

Indicators of Compromise

  • HTTP requests containing JSON bodies with duplicate keys in request logs
  • Anomalous input processing in upstream applications that differs from expected validated values
  • Application-level errors or unexpected behavior indicating receipt of malicious payloads that should have been blocked

Detection Strategies

  • Implement deep packet inspection rules to detect JSON payloads containing duplicate object keys
  • Deploy web application firewall (WAF) rules specifically targeting JSON key duplication patterns
  • Enable verbose logging on APISIX to capture full request bodies for forensic analysis
  • Monitor upstream application logs for input validation failures that contradict gateway validation success

Monitoring Recommendations

  • Establish baseline metrics for request validation plugin activity and monitor for anomalies
  • Configure alerting for upstream application errors that may indicate validation bypass exploitation
  • Implement correlation between APISIX validation logs and upstream application input processing logs
  • Deploy SentinelOne Singularity to monitor for post-exploitation activity resulting from validation bypass

How to Mitigate CVE-2022-25757

Immediate Actions Required

  • Upgrade Apache APISIX to version 2.13.0 or later immediately
  • Review all APISIX deployments using the request-validation plugin with body_schema validation
  • Implement additional input validation at the upstream application layer as defense-in-depth
  • Audit upstream applications to identify those using JSON libraries that prefer first-value semantics

Patch Information

The fix implemented in Apache APISIX 2.13.0 re-encodes the validated JSON input back into the request body after validation. This ensures that the normalized JSON (with duplicate keys resolved to the last value) is forwarded to upstream applications, eliminating the semantic mismatch between validation and processing. Organizations should upgrade to version 2.13.0 or later to remediate this vulnerability. For detailed information, refer to the Apache Thread Discussion and the Openwall OSS Security List Post.

Workarounds

  • If immediate patching is not possible, implement upstream application-level input validation to reject duplicate JSON keys
  • Deploy a reverse proxy or WAF in front of APISIX configured to normalize or reject JSON with duplicate keys
  • Temporarily disable the request-validation plugin if upstream applications perform adequate validation
  • Consider switching upstream applications to JSON libraries that use last-value semantics to match APISIX behavior
bash
# Verify APISIX version and upgrade if necessary
apisix version
# If running version < 2.13.0, upgrade immediately
# For Docker deployments:
docker pull apache/apisix:2.13.0
# Restart APISIX after upgrade
apisix restart

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechApache Apisix

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.49%

  • 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-20
  • Technical References
  • Openwall OSS Security List Post
  • Vendor Resources
  • Apache Thread Discussion
  • Related CVEs
  • CVE-2022-24112: Apache Apisix Auth Bypass Vulnerability

  • CVE-2021-43557: Apache Apisix Auth Bypass Vulnerability

  • CVE-2020-13945: Apache APISIX Auth Bypass Vulnerability

  • CVE-2026-31908: Apache APISIX Header Injection 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