Ingress-nginx `path` sanitization can be bypassed with newline character

Check todaySensitive data exposure over the network by a logged-in user.
7.6HIGH

CVE-2021-25748

Key Information:

Vendor

Kubernetes

CVE ID
CVE ID:
CVE-2021-25748
Vendor
CVE Published:
24 May 2023
Fixed in
Fixed in:
1.2.1

Timeline

  • Vulnerability published

  • Vulnerability Reserved

How risky is it?

  • Partly: Works over the network, but needs a login
  • No: No public exploit yet
  • No: Not on CISA's exploited list
  • No: No ransomware use seen

Our verdict

Check today

Find out if you're affected. If you are, patch.

What to do

1Update to a fixed version
Kubernetes ingress-nginx below 1.2.1 is vulnerable
Install Kubernetes ingress-nginx 1.2.1 or later
Read the vendor advisory β†—
2Can't patch yet? Reduce exposure

It can be reached over the network, so limit who can reach Kubernetes ingress-nginx. Block it from the internet, allow only trusted hosts or a VPN, and turn off the affected feature if you don't use it, until you can update.

3Why it's rated "Check today"
  • Its CVSS severity is high (7.6).

What is CVE-2021-25748?

A security vulnerability has been identified in ingress-nginx that allows an authenticated user to exploit newline characters in the spec.rules[].http.paths[].path field of an Ingress object. This manipulation can circumvent existing sanitization measures, enabling the unauthorized retrieval of the ingress-nginx controller's credentials, which by default possess access to all secrets within the Kubernetes cluster. This flaw poses a significant risk as it could lead to unauthorized access to sensitive information and requires immediate attention to mitigate potential exploitation.

References

Denial of Service in ingress-nginx

CVE-2026-116472
KubernetesIngress-nginxπŸ˜„2.7LOW

Path Traversal Vulnerability in Kubernetes CSI Driver for NFS

CVE-2026-3864
KubernetesCsi Driver For Nfs6.5MEDIUM

Code Injection in Ingress-nginx

CVE-2026-4342
KubernetesIngress-nginxπŸ”₯πŸ˜„8.8HIGH
View more Kubernetes vulnerabilities...

Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities Β· Report a correction

CVSS V3.1

Score:
7.6
Severity:
HIGH
Confidentiality:
High
Integrity:
Low
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
Low
User Interaction:
None
Scope:
Unchanged

Credit

Gafnit Amiga
.