Spring CORS allowed-origins=* with allow-credentials=true
Rule ID: vetkit.spring.cors.any-origin-credentials
A Spring CORS configuration allows every origin together with credentials (allowed-origins=* and allow-credentials=true on the same mapping), so any website can make authenticated requests and read the responses.
Last updated:
Suite: Security
regex
A Spring CORS configuration allows every origin together with credentials (allowed-origins=* and allow-credentials=true on the same mapping), so any website can make authenticated requests and read the responses.
Category: SECURITY · Engine rule severity: WARNING
How to fix it
List the trusted origins explicitly when allow-credentials is needed; allowed-origin-patterns=* reflects every caller's origin, so browsers accept the credentialed response.
References
Source: packages/engine/rules/sast/config.yml.
Related checks
- Spring YAML CORS allowed-origins "*" with allow-credentials
- Spring Boot actuator env show-values=always exposes secrets
- Spring Boot YAML show-values: always unmasks actuator env
- Spring Boot actuator exposure.include=* exposes all endpoints
- Spring Boot YAML exposure include "*" exposes all actuators
- Spring Boot 1.x management.security.enabled=false actuator
Check your own repository for this
vetkit runs this rule as part of a repository audit, alongside secret scanning, dependency vulnerabilities, code quality and AI code risk checks. It reads a temporary checkout and never executes your code.
Start with the free Security Quick Scan · See how the platform works
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.