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

CVE-2021-22112: Spring Security Privilege Escalation Flaw

CVE-2021-22112 is a privilege escalation vulnerability in Spring Security that allows elevated privileges to extend beyond intended application areas. This article covers technical details, affected versions, impact, and mitigation.

Published: March 4, 2026

CVE-2021-22112 Overview

CVE-2021-22112 is a privilege escalation vulnerability affecting Spring Security versions 5.4.x prior to 5.4.4, 5.3.x prior to 5.3.8.RELEASE, 5.2.x prior to 5.2.9.RELEASE, and older unsupported versions. The vulnerability occurs when the SecurityContext is changed more than once in a single request, potentially failing to save the updated context properly. While a malicious user cannot directly trigger this bug (it must be introduced through application code), if an application intends to grant elevated privileges only for a limited portion of its functionality, an attacker could leverage this flaw to extend those privileges across the entire application.

Critical Impact

Authenticated users could potentially extend elevated privileges beyond their intended scope, gaining unauthorized access to restricted application functionality and sensitive resources.

Affected Products

  • Pivotal Software Spring Security (versions prior to 5.4.4, 5.3.8.RELEASE, 5.2.9.RELEASE)
  • VMware Spring Security
  • Oracle Communications Element Manager
  • Oracle Communications Interactive Session Recorder (versions 6.3, 6.4)
  • Oracle Communications Unified Inventory Management (version 7.4.1)
  • Oracle Hospitality Cruise Shipboard Property Management System (version 20.1.0)
  • Oracle Insurance Policy Administration (versions 11.2.0, 11.3.0)
  • Oracle MySQL Enterprise Monitor

Discovery Timeline

  • February 23, 2021 - CVE-2021-22112 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-22112

Vulnerability Analysis

This vulnerability affects the SecurityContext handling mechanism in Spring Security, which is responsible for maintaining authentication and authorization state throughout the lifecycle of HTTP requests. When an application modifies the SecurityContext multiple times within a single request—such as temporarily elevating a user's privileges for a specific operation—the framework may fail to persist the final state correctly.

The core issue lies in how Spring Security manages the SecurityContextHolder during request processing. Applications that implement step-up authentication patterns or temporary privilege elevation are particularly susceptible. In these scenarios, developers might programmatically grant additional authorities to a user for a specific code path, expecting the original context to be restored afterward. However, due to this bug, the elevated privileges may persist beyond their intended scope.

Root Cause

The root cause stems from a race condition in the SecurityContext persistence mechanism. When the SecurityContext is modified multiple times within a single request, the framework's context persistence logic may not correctly track all changes, causing subsequent saves to be skipped or improperly handled. This results in an inconsistent security state where elevated privileges granted temporarily are not properly revoked at the expected boundaries.

Attack Vector

The vulnerability requires the following conditions for exploitation:

  1. Application Design Flaw: The target application must be coded in a way that modifies the SecurityContext multiple times during a single request
  2. Authenticated Access: The attacker must have valid authentication credentials to access the application
  3. Privilege Boundary: The application must implement functionality that grants temporary elevated privileges to users

An attacker with low-level access to such an application could identify endpoints or workflows where temporary privilege elevation occurs and then leverage the bug to retain those elevated privileges for subsequent operations. This could allow access to administrative functions, sensitive data retrieval, or modification of protected resources.

The attack scenario involves an authenticated user triggering the vulnerable code path where privilege elevation occurs, then leveraging the unsaved context state to access functionality that should require the elevated privileges they were only temporarily granted.

Detection Methods for CVE-2021-22112

Indicators of Compromise

  • Unusual access patterns where low-privilege users access administrative or restricted endpoints
  • Authentication logs showing users successfully accessing resources beyond their normal authorization level
  • Application logs indicating SecurityContext changes that don't align with expected user privilege flows
  • Audit trail anomalies showing privilege escalation without corresponding step-up authentication events

Detection Strategies

  • Review application code for patterns where SecurityContextHolder.setContext() or SecurityContext.setAuthentication() is called multiple times within request handlers
  • Monitor access control logs for users accessing resources outside their designated privilege scope
  • Implement runtime security monitoring to detect authentication state inconsistencies during request processing
  • Deploy application security testing tools to identify vulnerable code patterns in Spring Security implementations

Monitoring Recommendations

  • Enable detailed Spring Security debug logging to track SecurityContext lifecycle events
  • Configure audit logging for all privilege elevation operations and their expected duration
  • Implement alerting for access control violations where users reach restricted endpoints
  • Monitor for abnormal session behavior patterns that may indicate privilege persistence issues

How to Mitigate CVE-2021-22112

Immediate Actions Required

  • Upgrade Spring Security to patched versions: 5.4.4 or later, 5.3.8.RELEASE or later, or 5.2.9.RELEASE or later
  • Review application code to identify any patterns that modify SecurityContext multiple times per request
  • Implement additional authorization checks at sensitive endpoints as a defense-in-depth measure
  • Audit access logs for any evidence of privilege escalation exploitation

Patch Information

VMware has released security patches to address this vulnerability. Organizations should update to the following versions:

  • Spring Security 5.4.x: Upgrade to 5.4.4 or later
  • Spring Security 5.3.x: Upgrade to 5.3.8.RELEASE or later
  • Spring Security 5.2.x: Upgrade to 5.2.9.RELEASE or later

For detailed patch information, refer to the VMware Tanzu CVE-2021-22112 Advisory. Oracle users should consult the Oracle CPU April 2021 Alerts and Oracle CPU October 2021 Alerts for updates to affected Oracle products.

Workarounds

  • Refactor application code to avoid multiple SecurityContext modifications within a single request
  • Implement explicit SecurityContext save operations after each modification if upgrading is not immediately possible
  • Use SecurityContextPersistenceFilter with explicit save behavior configuration
  • Add redundant authorization checks at each privilege boundary to verify expected access levels
bash
# Verify Spring Security version in Maven project
mvn dependency:tree | grep spring-security

# Update Spring Security in pom.xml to patched version
# For Spring Security 5.4.x:
# <spring-security.version>5.4.4</spring-security.version>

# Rebuild and redeploy application
mvn clean package

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechSpring Security

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.98%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • NVD-CWE-noinfo
  • Technical References
  • Openwall OSS Security Discussion

  • Apache Pluto Development Thread

  • Apache Pluto SCM Thread

  • Apache Pluto Development Discussion

  • Apache Pluto Development Updates

  • Apache Pluto Development Inquiry

  • Apache Pluto Development Thread

  • Apache Pluto Development Summary

  • Apache Pluto SCM Discussion

  • Apache Pluto Development Update

  • Apache NiFi Issue Discussion

  • Oracle CPU July 2021 Alerts
  • Vendor Resources
  • VMware Tanzu CVE-2021-22112 Advisory

  • Oracle CPU April 2021 Alerts

  • Oracle CPU October 2021 Alerts
  • Related CVEs
  • CVE-2026-22751: Spring Security Race Condition Vulnerability

  • CVE-2026-22746: Spring Security Auth Bypass Vulnerability

  • CVE-2026-22747: Spring Security Auth Bypass Vulnerability

  • CVE-2026-22754: Spring Security 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