CVE-2026-58203
Description
pydantic-settings provides settings management using Pydantic. From 2.12.0 until 2.14.2, NestedSecretsSettingsSource reads secret values from files in a configured secrets_dir. When secrets_nested_subdir=True, a directory entry inside secrets_dir that is a symbolic link pointing outside secrets_dir is followed, so files outside the configured directory are read into settings values. The same code path bypasses the documented secrets_dir_max_size protection. An attacker or lower-privileged component able to influence entries in the configured secrets directory (for example, a writable or shared secrets mount) can turn this into an unintended local file read into settings and can defeat the advertised loading-size cap. This vulnerability is fixed in 2.14.2.
Weakness
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory
- CWE-59: Improper Link Resolution Before File Access
- CWE-400: Uncontrolled Resource Consumption
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-07-06 |
Timeline
- 2026-06-19GitHub advisory published (GHSA-4xgf-cpjx-pc3j)17 days before publication
- 2026-07-06Published by the CNA14:24 UTC
- 2026-07-06CISA SSVC decision recordedsame day
Exploit and advisory records
GitHub advisory GHSA-4xgf-cpjx-pc3j, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| PyPI pydantic-settings | from 2.12.0 before 2.14.2 | 2.14.2 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| pydantic pydantic-settings | from 2.12.0 before 2.14.2fixed in 2.14.2 | 2.14.2 |
References
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-58203'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-58203'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-58203'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-58203'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).