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

CVE-2021-25746: Kubernetes Ingress-nginx Disclosure Flaw

CVE-2021-25746 is an information disclosure vulnerability in Kubernetes Ingress-nginx allowing attackers to obtain controller credentials with access to all cluster secrets. This article covers technical details, impact, and fixes.

Published: February 25, 2026

CVE-2021-25746 Overview

A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use .metadata.annotations in an Ingress object (in the networking.k8s.io or extensions API group) to obtain the credentials of the ingress-nginx controller. In the default configuration, that credential has access to all secrets in the cluster.

Critical Impact

Authenticated users with ingress creation privileges can steal ingress-nginx controller credentials, potentially gaining access to all Kubernetes secrets in the cluster.

Affected Products

  • Kubernetes ingress-nginx (vulnerable versions)

Discovery Timeline

  • 2022-05-06 - CVE CVE-2021-25746 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-25746

Vulnerability Analysis

This vulnerability stems from improper input validation (CWE-20) in the Kubernetes ingress-nginx controller's handling of annotation metadata. The ingress-nginx controller processes annotations specified in Ingress objects to configure NGINX behavior. However, a flaw in how these annotations are validated and processed allows an attacker to inject malicious content that can be leveraged to extract sensitive controller credentials.

When an Ingress object is created or updated, the ingress-nginx controller reads and processes the .metadata.annotations field. An attacker with permissions to create or modify Ingress resources can craft specific annotation values that exploit the parsing logic, leading to credential exposure. In the default Kubernetes RBAC configuration, the ingress-nginx controller service account typically has broad read access to secrets across all namespaces, making this vulnerability particularly dangerous.

Root Cause

The root cause is improper input validation (CWE-20) in the annotation processing logic of the ingress-nginx controller. The controller fails to adequately sanitize or restrict the content of certain annotation values, allowing attackers to inject payloads that result in credential disclosure. This is a classic case of trusting user-supplied input without proper validation in a security-sensitive context.

Attack Vector

The attack vector is network-based and requires low-privilege authenticated access. An attacker needs the ability to create or update Ingress objects within the Kubernetes cluster, which is a permission commonly granted to developers and service accounts. The attack does not require user interaction and can be performed remotely.

The attacker crafts an Ingress object with specially constructed .metadata.annotations that exploit the annotation processing logic. When the ingress-nginx controller processes this Ingress object, the malicious annotations trigger the credential exposure mechanism, allowing the attacker to retrieve the controller's service account token or other sensitive credentials.

In the default configuration, these credentials provide access to all secrets in the cluster, enabling the attacker to escalate their access significantly—potentially reading database passwords, API keys, TLS certificates, and other sensitive information stored as Kubernetes secrets.

Detection Methods for CVE-2021-25746

Indicators of Compromise

  • Unusual or malformed annotations in Ingress objects, particularly those containing special characters or escape sequences
  • Unexpected Ingress object creation or modification by non-standard users or service accounts
  • Anomalous API calls to read secrets from namespaces outside the typical scope of an application
  • Ingress objects with suspicious annotation patterns targeting controller configuration

Detection Strategies

  • Implement Kubernetes audit logging and monitor for Ingress object creation and update events with unusual annotation content
  • Deploy admission controllers (such as OPA Gatekeeper or Kyverno) to validate and restrict annotation content in Ingress objects
  • Monitor ingress-nginx controller logs for errors or warnings related to annotation processing
  • Use security scanning tools to identify Ingress objects with potentially malicious annotation patterns

Monitoring Recommendations

  • Enable and centralize Kubernetes audit logs with focus on Ingress resource operations
  • Set up alerts for Ingress objects created or modified by unexpected users or service accounts
  • Monitor for secret access patterns that deviate from established baselines
  • Implement runtime security monitoring to detect credential theft attempts from controller pods

How to Mitigate CVE-2021-25746

Immediate Actions Required

  • Upgrade ingress-nginx to a patched version as specified in the Kubernetes Security Announcement
  • Review all existing Ingress objects for suspicious or unexpected annotations
  • Implement RBAC restrictions to limit which users and service accounts can create or modify Ingress objects
  • Consider applying admission policies to validate annotation content before Ingress objects are created

Patch Information

Kubernetes has released security patches addressing this vulnerability. Refer to the GitHub Issue Discussion and the Kubernetes Security Announcement for specific version information and upgrade instructions. The NetApp Security Advisory also provides additional guidance for affected NetApp products.

Workarounds

  • Restrict Ingress creation permissions to trusted administrators only using Kubernetes RBAC
  • Deploy admission controllers to validate and sanitize Ingress annotations before they are processed
  • Reduce the permissions of the ingress-nginx controller service account to follow the principle of least privilege
  • Network segment the ingress-nginx controller to limit the impact of potential credential theft
bash
# Example: Restrict ingress-nginx controller service account permissions
# Create a more restrictive ClusterRole that limits secret access
kubectl create clusterrole ingress-nginx-restricted \
  --verb=get,list,watch \
  --resource=secrets \
  --resource-name=<specific-secrets-only>

# Bind the restrictive role to the ingress-nginx service account
kubectl create clusterrolebinding ingress-nginx-restricted-binding \
  --clusterrole=ingress-nginx-restricted \
  --serviceaccount=ingress-nginx:ingress-nginx

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

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechKubernetes

  • SeverityHIGH

  • CVSS Score7.1

  • EPSS Probability0.58%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-20
  • Technical References
  • NetApp Security Advisory
  • Vendor Resources
  • GitHub Issue Discussion

  • Kubernetes Security Announcement
  • Related CVEs
  • CVE-2025-9708: Kubernetes C# Client Certificate Flaw

  • CVE-2023-2878: Kubernetes Secrets Store CSI Driver Vulnerability

  • CVE-2024-5321: Kubernetes Windows Log Disclosure Flaw

  • CVE-2021-25745: Kubernetes Ingress-nginx Info Disclosure
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