---
id: CVE-2021-25748
aliases:
  - GHSA-863x-868h-968x
title: Ingress-nginx `path` sanitization can be bypassed with newline character
summary: Ingress-nginx `path` sanitization can be bypassed with newline character
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'
vendor: ingress-nginx
product: k8s.io/ingress-nginx
ecosystem: go
affected:
  - k8s.io/ingress-nginx < 1.2.1
patched:
  - k8s.io/ingress-nginx 1.2.1
published: '2023-05-24'
updated: '2026-08-07'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-863x-868h-968x'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-25748'
  - url: 'https://github.com/kubernetes/ingress-nginx/issues/8686'
  - url: 'https://github.com/kubernetes/ingress-nginx/pull/8623'
  - url: 'https://github.com/kubernetes/ingress-nginx'
  - url: 'https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.2.1'
  - url: 'https://groups.google.com/g/kubernetes-security-announce/c/avaRYa9c7I8'
tags:
  - osv
  - go
epss: 0.00694
epssPercentile: 0.50887
ingestedAt: '2026-08-07T19:14:16.283Z'
---

## Overview

A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use a newline character to bypass the sanitization of the `spec.rules[].http.paths[].path` field of 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.

## Affected packages

- `k8s.io/ingress-nginx < 1.2.1`

## Remediation

Upgrade to a patched release:

- `k8s.io/ingress-nginx 1.2.1`
