CVE-2023-5043
published 2023-10-25CVE-2023-5043: Ingress nginx annotation injection causes arbitrary command execution.
PriorityP259high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
EPSS
2.23%
80.6th percentile
Ingress nginx annotation injection causes arbitrary command execution.
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;)
- →The injected annotation value contains NGINX Lua execution directives (content_by_lua), comment characters (#), or block-termination sequences (;}) — match these patterns immediately after the annotation key in the JSON body.
- →Requests include the Kubernetes admission API version string 'admission.k8s.io/v1' in the JSON body, which can serve as a pre-filter before checking for the malicious annotation.
- →Detection should be applied at the perimeter and internally, and requires TLS decryption (TLSDecrypt) to inspect the payload in encrypted environments.
- ·The Snort/Suricata rule (sid:2061121) references CVE-2023-5044 in its metadata and rule message, but is cross-referenced to CVE-2023-5043 via the GitHub PoC URL — confirm the correct CVE scope before deploying to avoid alert mislabeling.
CVSS provenance
nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
ghsa8.8HIGH
osv8.8HIGH
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 annotation injection causes arbitrary command execution
osv·2023-10-25·CVSS 8.8
CVE-2023-5043 [HIGH] Ingress nginx annotation injection causes arbitrary command execution
Ingress nginx annotation injection causes arbitrary command execution
### Issue Details
A security issue was identified in ingress-nginx where the nginx.ingress.kubernetes.io/configuration-snippet 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.
This issue has been rated High (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L), and assigned CVE-2023-5043.
### Affected Components and Configurations
This bug affects ingress-nginx. If you do not have ingress-nginx installed on your cluster, you are not affected. You can check this by running kubectl get po -n ingress-nginx.
GHSA
Ingress nginx annotation injection causes arbitrary command execution
ghsa·2023-10-25·CVSS 8.8
CVE-2023-5043 [HIGH] CWE-20 Ingress nginx annotation injection causes arbitrary command execution
Ingress nginx annotation injection causes arbitrary command execution
### Issue Details
A security issue was identified in ingress-nginx where the nginx.ingress.kubernetes.io/configuration-snippet 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.
This issue has been rated High (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L), and assigned CVE-2023-5043.
### Affected Components and Configurations
This bug affects ingress-nginx. If you do not have ingress-nginx installed on your cluster, you are not affected. You can check this by running kubectl get po -n ingress-nginx.
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,
No public exploits indexed.
http://www.openwall.com/lists/oss-security/2023/10/25/4https://github.com/kubernetes/ingress-nginx/issues/10571https://groups.google.com/g/kubernetes-security-announce/c/pVsXsOpxYZohttps://security.netapp.com/advisory/ntap-20240307-0012/http://www.openwall.com/lists/oss-security/2023/10/25/4https://github.com/kubernetes/ingress-nginx/issues/10571https://groups.google.com/g/kubernetes-security-announce/c/pVsXsOpxYZohttps://security.netapp.com/advisory/ntap-20240307-0012/
2023-10-25
Published