CVE-2023-5044
published 2023-10-25CVE-2023-5044: Code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation.
PriorityP267high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
EPSS
56.57%
98.9th percentile
Code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation.
Affected
2 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| k8s.io | ingress-nginx | >= 0 < 1.9.0 | 1.9.0 |
| kubernetes | ingress-nginx | < 1.9.0 | 1.9.0 |
Detection & IOCsextracted from sources · hover to see the quote
snort
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET WEB_SERVER Kubernetes Ingress NGINX Controller configuration-snippet Annotation Injection (CVE-2023-5044)"; flow:established,to_server; http.method; content:"POST"; http.content_type; content:"application/json"; http.request_body; content:"|22|admission.k8s.io/v1|22 2c|"; content:"|22|nginx.ingress.kubernetes.io/configuration-snippet|22 3a|"; fast_pattern; pcre:"/^\s*?\x22[^\x2c]*?(?:content_by_lua|\x23|\x3b\x7d)/R"; reference:url,github.com/r0binak/CVE-2023-5043; reference:cve,2023-5044; classtype:web-application-attack; sid:2061121; rev:1; metadata:affected_product Kubernetes, attack_target Server, tls_state TLSDecrypt, created_at 2025_03_27, cve CVE_2023_5044, deployment Perimeter, deployment Internal, deployment SSLDecrypt, confidence High, signature_severity Major, tag Exploit, updated_at 2025_03_27, mitre_tactic_id TA0001, mitre_tactic_name Initial_Access, mitre_technique_id T1190, mitre_technique_name Exploit_Public_Facing_Application; target:dest_ip;)
snort
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET WEB_SERVER Kubernetes Ingress NGINX Controller permanent-redirect Annotation Injection (CVE-2023-5044)"; flow:established,to_server; http.method; content:"POST"; http.content_type; content:"application/json"; http.request_body; content:"|22|admission.k8s.io/v1|22 2c|"; content:"|22|nginx.ingress.kubernetes.io/permanent-redirect|22 3a|"; fast_pattern; pcre:"/^\s*?\x22[^\x22]*?(?:\\n|[\x23\x3b])/R"; reference:url,raesene.github.io/blog/2023/10/29/exploiting-CVE-2023-5044/; reference:cve,2023-5044; classtype:web-application-attack; sid:2061120; rev:1; metadata:affected_product Kubernetes, attack_target Server, tls_state TLSDecrypt, created_at 2025_03_27, cve CVE_2023_5044, deployment Perimeter, deployment Internal, deployment SSLDecrypt, signature_severity Major, tag Exploit, updated_at 2025_03_27, mitre_tactic_id TA0001, mitre_tactic_name Initial_Access, mitre_technique_id T1190, mitre_technique_name Exploit_Public_Facing_Application; target:dest_ip;)
- →Exploit traffic targets the Kubernetes admission webhook endpoint via HTTP POST with Content-Type application/json; look for the admission API version string 'admission.k8s.io/v1' in the request body alongside the malicious annotation key.
- →For the permanent-redirect injection vector, detect POST requests to the admission webhook containing 'nginx.ingress.kubernetes.io/permanent-redirect' annotation values that include newline (\n), '#' (0x23), or ';' (0x3b) characters — these are used to break out of the redirect value and inject arbitrary NGINX config directives.
- →For the configuration-snippet injection vector, flag annotation values containing Lua execution via 'content_by_lua', comment characters '#' (0x23), or block-closing sequences ';}' (0x3b 0x7d) which are used to escape the snippet context and inject arbitrary directives.
- →Both attack vectors arrive as HTTP POST with Content-Type application/json directed at the ingress-nginx admission controller; deploy detection on both perimeter and internal segments, and on TLS-decrypting inspection points.
- →Code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation is the primary described attack surface for CVE-2023-5044. ↗
- ·Both Snort rules require TLS decryption (tls_state TLSDecrypt) to inspect the admission webhook request body; without SSL/TLS inspection in-line, the rules will not fire on encrypted traffic.
- ·The rules are scoped to HTTP POST traffic from EXTERNAL_NET to HOME_NET — ensure the Kubernetes admission controller endpoint is reachable from the monitored network segment and that HOME_NET is correctly defined to include the cluster's API server/admission webhook address.
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation in k8s.io/ingress-nginx
osv·2024-06-28
CVE-2023-5044 Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation in k8s.io/ingress-nginx
Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation in k8s.io/ingress-nginx
Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation in k8s.io/ingress-nginx.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: k8s.io/ingress-nginx before v1.9.0.
GHSA
Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation
ghsa·2023-10-25
CVE-2023-5044 [HIGH] CWE-20 Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation
Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation
A security issue was identified in [ingress-nginx](https://github.com/kubernetes/ingress-nginx) where the nginx.ingress.kubernetes.io/permanent-redirect annotation on an Ingress object (in the networking.k8s.io or extensions API group) can be used to inject arbitrary commands, and obtain the credentials of the ingress-nginx controller. In the default configuration, that credential has access to all secrets in the cluster.
OSV
Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation
osv·2023-10-25
CVE-2023-5044 [HIGH] Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation
Ingress-nginx code injection via nginx.ingress.kubernetes.io/permanent-redirect annotation
A security issue was identified in [ingress-nginx](https://github.com/kubernetes/ingress-nginx) where the nginx.ingress.kubernetes.io/permanent-redirect annotation on an Ingress object (in the networking.k8s.io or extensions API group) can be used to inject arbitrary commands, and obtain the credentials of the ingress-nginx controller. In the default configuration, that credential has access to all secrets in the cluster.
Suricata
ET WEB_SERVER Kubernetes Ingress NGINX Controller configuration-snippet Annotation Injection (CVE-2023-5044)
suricata·2025-03-27·CVSS 7.6
CVE-2023-5044 [HIGH] ET WEB_SERVER Kubernetes Ingress NGINX Controller configuration-snippet Annotation Injection (CVE-2023-5044)
ET WEB_SERVER Kubernetes Ingress NGINX Controller configuration-snippet Annotation Injection (CVE-2023-5044)
Rule: alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET WEB_SERVER Kubernetes Ingress NGINX Controller configuration-snippet Annotation Injection (CVE-2023-5044)"; flow:established,to_server; http.method; content:"POST"; http.content_type; content:"application/json"; http.request_body; content:"|22|admission.k8s.io/v1|22 2c|"; content:"|22|nginx.ingress.kubernetes.io/configuration-snippet|22 3a|"; fast_pattern; pcre:"/^\s*?\x22[^\x2c]*?(?:content_by_lua|\x23|\x3b\x7d)/R"; reference:url,github.com/r0binak/CVE-2023-5043; reference:cve,2023-5044; classtype:web-application-attack; sid:2061121; rev:1; metadata:affected_product Kubernetes, attack_target Server, tls_state TLSDecrypt,
Suricata
ET WEB_SERVER Kubernetes Ingress NGINX Controller permanent-redirect Annotation Injection (CVE-2023-5044)
suricata·2025-03-27·CVSS 7.6
CVE-2023-5044 [HIGH] ET WEB_SERVER Kubernetes Ingress NGINX Controller permanent-redirect Annotation Injection (CVE-2023-5044)
ET WEB_SERVER Kubernetes Ingress NGINX Controller permanent-redirect Annotation Injection (CVE-2023-5044)
Rule: alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET WEB_SERVER Kubernetes Ingress NGINX Controller permanent-redirect Annotation Injection (CVE-2023-5044)"; flow:established,to_server; http.method; content:"POST"; http.content_type; content:"application/json"; http.request_body; content:"|22|admission.k8s.io/v1|22 2c|"; content:"|22|nginx.ingress.kubernetes.io/permanent-redirect|22 3a|"; fast_pattern; pcre:"/^\s*?\x22[^\x22]*?(?:\\n|[\x23\x3b])/R"; reference:url,raesene.github.io/blog/2023/10/29/exploiting-CVE-2023-5044/; reference:cve,2023-5044; classtype:web-application-attack; sid:2061120; rev:1; metadata:affected_product Kubernetes, attack_target Server, tls_state TLSDecr
No public exploits indexed.
http://www.openwall.com/lists/oss-security/2023/10/25/3https://github.com/kubernetes/ingress-nginx/issues/10572https://groups.google.com/g/kubernetes-security-announce/c/ukuYYvRNel0https://security.netapp.com/advisory/ntap-20240307-0012/http://www.openwall.com/lists/oss-security/2023/10/25/3https://github.com/kubernetes/ingress-nginx/issues/10572https://groups.google.com/g/kubernetes-security-announce/c/ukuYYvRNel0https://security.netapp.com/advisory/ntap-20240307-0012/
2023-10-25
Published