Skip to content
vetkitChecksChangelogDocumentation

vetkit.nginx.cors.reflected-origin-credentials

nginx reflects the request's Origin header into Access-Control-Allow-Origin while also allowing credentials. Any website can then make authenticated cross-origin requests and read the responses.

Last updated:

Suite: Security

regex

nginx reflects the request's Origin header into Access-Control-Allow-Origin while also allowing credentials. Any website can then make authenticated cross-origin requests and read the responses.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Only echo origins from an explicit allow-list, e.g. with map $http_origin $cors_origin { ~^https://(app|admin)\.example\.com$ $http_origin; }.

References

Source: packages/engine/rules/sast/config.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.