CVE-2026-40981
HIGHCVE-2026-40981 is a high-severity (CVSS 7.5) CWE-639 vulnerability in org.springframework.cloud:spring-cloud-config-server. O3 Security confirms whether CVE-2026-40981 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Spring Cloud Config has an Authorization Bypass Through User-Controlled Key
Real-World Exposure
org.springframework.cloud:spring-cloud-config-server☕org.springframework.cloud:spring-cloud-config-server☕org.springframework.cloud:spring-cloud-config-server☕org.springframework.cloud:spring-cloud-config-server☕org.springframework.cloud:spring-cloud-config-serverReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
When using Google Secrets Manager as a backend for the Spring Cloud Config server a client can craft a request to the config server potentially exposing secrets from unintended GCP projects. Spring Cloud Config 3.1.x: affected from 3.1.0 through 3.1.13 (inclusive); upgrade to 3.1.14 or greater (Enterprise Support Only). Spring Cloud Config 4.1.x: affected from 4.1.0 through 4.1.9 (inclusive); upgrade to 4.1.10 or greater (Enterprise Support Only). Spring Cloud Config 4.2.x: affected from 4.2.0 through 4.2.6 (inclusive); upgrade to 4.2.7 or greater (Enterprise Support Only). Spring Cloud Config 4.3.x: affected from 4.3.0 through 4.3.2 (inclusive); upgrade to 4.3.3 or greater. Spring Cloud Config 5.0.x: affected from 5.0.0 through 5.0.2 (inclusive); upgrade to 5.0.3 or greater.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.springframework.cloud:spring-cloud-config-server | ≥ 3.1.0 | No fix |
| ☕Maven | org.springframework.cloud:spring-cloud-config-server | ≥ 4.1.0 | No fix |
| ☕Maven | org.springframework.cloud:spring-cloud-config-server | ≥ 4.2.0 | No fix |
| ☕Maven | org.springframework.cloud:spring-cloud-config-server | ≥ 4.3.0&&< 4.3.3 | 4.3.3 |
| ☕Maven | org.springframework.cloud:spring-cloud-config-server | ≥ 5.0.0&&< 5.0.3 | 5.0.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.springframework.cloud:spring-cloud-config-server. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
No patched version of org.springframework.cloud:spring-cloud-config-server has shipped for CVE-2026-40981 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether CVE-2026-40981 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to CVE-2026-40981. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2026-40981 in your dependencies?
O3 detects CVE-2026-40981 across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.