A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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 flaw in Apache APISIX that exploits duplicate JSON keys to evade body_schema validation. This article covers technical details, affected versions, impact, and mitigation.

Updated: May 16, 2026

CVE-2022-25757 Overview

CVE-2022-25757 is an improper input validation vulnerability in Apache APISIX versions prior to 2.13.0. The flaw allows attackers to bypass the body_schema validation in the request-validation plugin by submitting JSON payloads containing duplicate keys. The Lua-based JSON parser lua-cjson selects the last occurrence of a duplicate key, while certain upstream JSON libraries such as jsoniter or gojay select the first occurrence. This parser disagreement enables attackers to smuggle malicious values past APISIX validation while delivering them to the upstream application [CWE-20].

Critical Impact

Remote, unauthenticated attackers can bypass request schema validation and inject unvalidated input into upstream applications, undermining the API gateway's security controls.

Affected Products

  • Apache APISIX versions 2.12.1 and prior
  • Apache APISIX deployments using the request-validation plugin with body_schema
  • Upstream applications using JSON parsers that select the first duplicate key value (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

Apache APISIX is an open-source API gateway that uses the request-validation plugin to enforce JSON schema constraints on incoming request bodies. The plugin relies on lua-cjson to parse client-supplied JSON before applying schema rules. When the parser encounters duplicate keys, it retains only the final occurrence and discards earlier values. Schema validation therefore operates on a reduced view of the payload.

After validation succeeds, APISIX forwards the original request body to the upstream service without re-encoding it. If the upstream uses a JSON library that prefers the first occurrence of a duplicate key, the upstream sees a different value than APISIX validated. This parser inconsistency creates a validation bypass at the gateway boundary.

For example, the payload {"string_payload":"bad","string_payload":"good"} is validated by APISIX against the value "good" but processed by jsoniter or gojay upstream as "bad". Any security control that depends on the gateway sanitizing input fails closed only at the gateway, not at the application.

Root Cause

The root cause is divergent behavior across JSON parsers for non-unique keys, combined with APISIX forwarding the raw original payload rather than the normalized parsed representation. RFC 8259 leaves duplicate key handling implementation-defined, and APISIX did not enforce a canonical interpretation.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker crafts a JSON request containing at least one duplicate key, places the value that would pass validation in the position favored by lua-cjson (last occurrence), and places the malicious payload in the position favored by the upstream parser (first occurrence). The request traverses APISIX, passes schema checks, and reaches the application with attacker-controlled input.

The vulnerability manifests only when three conditions hold: the route uses body_schema in the request-validation plugin, the upstream consumes the body with a first-key-wins JSON library, and the upstream omits its own input validation. See the Apache Mailing List Thread for the full technical advisory.

Detection Methods for CVE-2022-25757

Indicators of Compromise

  • Inbound JSON request bodies containing duplicate object keys, particularly for fields covered by body_schema rules
  • Upstream application logs showing field values that differ from values logged by APISIX for the same request
  • Successful requests to routes protected by request-validation whose payloads contain values that should have been rejected

Detection Strategies

  • Inspect raw request bodies at the API gateway and alert on JSON objects containing repeated keys
  • Compare parsed request fields between APISIX access logs and upstream application logs to surface parser disagreement
  • Add a pre-validation step that rejects payloads whose top-level or nested objects contain duplicate keys

Monitoring Recommendations

  • Enable verbose request-validation plugin logging and forward logs to a centralized analytics platform for correlation
  • Monitor APISIX versions in production and alert when instances run a release earlier than 2.13.0
  • Track anomalous spikes in request-validation plugin pass rates for endpoints handling sensitive fields

How to Mitigate CVE-2022-25757

Immediate Actions Required

  • Upgrade Apache APISIX to version 2.13.0 or later, which re-encodes the validated JSON back into the request body before forwarding it upstream
  • Audit all routes that use the request-validation plugin with body_schema and inventory upstream services consuming those routes
  • Add server-side input validation in upstream applications so the gateway is not the sole enforcement point

Patch Information

The fix shipped in Apache APISIX 2.13.0. APISIX now re-encodes the parsed JSON object after validation and replaces the original request body, eliminating the duplicate-key discrepancy between the gateway and upstream parsers. Refer to the Apache Mailing List Thread and the Openwall OSS-Security Discussion for release details.

Workarounds

  • Deploy a pre-filter that rejects JSON payloads containing duplicate keys before they reach the request-validation plugin
  • Standardize upstream services on a JSON parser that matches lua-cjson semantics (last-key-wins) or one that rejects duplicate keys outright
  • Enforce defense-in-depth by requiring upstream applications to revalidate all input against the same schema used at the gateway
bash
# Verify the running APISIX version and upgrade if below 2.13.0
apisix version
# Upgrade via package manager or container image, for example:
docker pull apache/apisix:2.13.0-alpine

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.42%

  • 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 Discussion
  • Vendor Resources
  • Apache Mailing List Thread
  • 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 Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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