CME-922

Trusted Source Validation for Security Decisions (Anti-Spoofing)

Description

Security-relevant request attributes — caller identity, authentication state, source address, request origin, and anti-CSRF tokens — are derived from server-side trusted state or cryptographically bound session tokens, never from client-controllable request fields. The application does not make authentication or authorization decisions based on arbitrary request headers (for example X-Forwarded-For or X-Real-IP unless set by a trusted reverse proxy and stripped from client input), client-set cookies validated only by comparison against a matching request parameter (double-submit without a server-bound secret), or hidden form fields. Prevents authentication-bypass-by-spoofing and reliance-on-untrusted-input defects where an attacker forges a security decision by controlling both sides of the check. Distinct from CSRF synchronizer-token controls (CWE-352), from origin enforcement (CME-915), and from cross-boundary data sanitization (CME-1321): this control governs the trustworthiness of the inputs a security decision is made from, not the sanitization of data crossing the boundary.

CVSS Vector Impacts

Metric Transition Rationale
Attack Complexity (AC) L → H Exploitation can no longer be achieved by simply setting a request header, supplying a matching client-controlled cookie/parameter pair, or editing a hidden field; the attacker must defeat server-side-derived state or a cryptographically bound token, which is not controllable from the request.
Integrity (I) H → L Privileged or state-changing actions (password reset, command execution, privilege assumption) can no longer be forged by spoofing identity or re-supplying attacker-controlled security inputs, because the server authorizes against trusted session state rather than request-supplied values.
Confidentiality (C) H → L A spoofed identity or source no longer resolves to another principal's authorization context, so bulk access to data belonging to the impersonated principal is prevented at the decision point. This attenuation applies only when the exploited security decision gates confidentiality (identity-spoofing to read another principal's data), such as Dell DDPM (CVE-2026-59914); it does not apply to the integrity/CSRF members of this cluster whose base vector is C:N, and the attenuation engine automatically gates it on C:H being present in the base vector.

CWE Relationships

Verification

Primarily verified by source review (commands 1-2): confirm authentication and authorization decisions are not keyed off client-controllable request attributes and that anti-CSRF validation is bound to a server-side secret/session. Command 3 is a dynamic probe against a deployed target set via CME922_TARGET_URL.

$ grep -rniE 'x-forwarded-for|x-real-ip|x-original-url|request\.(headers|cookies)\[[^]]*(role|admin|user|auth|is_)' <app_source>/ | grep -viE 'strip|remove|del|sanitiz|trusted_proxy'
# Expected: Empty or review-only — no security decision is made directly from client-controllable headers/cookies without a trusted-proxy guard
Platform: any
$ grep -rniE 'csrf' <app_source>/ | grep -iE 'secret|hmac|session|synchroniz' | head
# Expected: Anti-CSRF validation bound to a server-side secret/session, not a bare cookie==param comparison
Platform: any
$ url="${CME922_TARGET_URL:-http://localhost:8080/admin/}"; curl -s -o /dev/null -w '%{http_code}' -H 'X-Forwarded-For: 127.0.0.1' -H 'X-Real-IP: 127.0.0.1' "$url"
# Expected: 401 or 403 — spoofed trusted-source headers do not grant access at CME922_TARGET_URL
Platform: any

Remediation

linux Strip/override client-supplied trust headers at the nginx reverse proxy

install -d /etc/nginx/snippets && printf 'proxy_set_header X-Forwarded-For $remote_addr;\nproxy_set_header X-Real-IP $remote_addr;\nproxy_set_header X-Forwarded-Host $host;\nproxy_set_header X-Original-URL "";\nproxy_set_header X-Rewrite-URL "";\n' > /etc/nginx/snippets/cme-922-trusted-headers.conf
grep -q 'cme-922-trusted-headers.conf' <proxy_vhost_conf> || sed -i '/location .* {/a \    include snippets/cme-922-trusted-headers.conf;' <proxy_vhost_conf>
nginx -t
systemctl reload nginx
kubernetes Clear client-supplied trust headers at the Kubernetes/OpenShift ingress

kubectl annotate ingress <ingress> -n <namespace> --overwrite 'nginx.ingress.kubernetes.io/configuration-snippet=more_clear_input_headers "X-Forwarded-For" "X-Real-IP" "X-Original-URL" "X-Rewrite-URL";'
kubectl get configmap -n <ingress_ns> <controller_configmap> -o jsonpath='{.data.allow-snippet-annotations}' | grep -q true || kubectl patch configmap <controller_configmap> -n <ingress_ns> --type merge -p '{"data":{"allow-snippet-annotations":"true"}}'

References

← CME-921: URL Request Path Canonicalization Before Authorization CME-923: Mass-Assignment Prevention Through Explicit Request Schemas →