CVE-2026-58203: NestedSecretsSettingsSource follows symlinks outside secrets_dir, enabling local file read and bypassing secrets_dir_max_size
Vulnerability summary
CVE-2026-58203 is a medium (CVSS 5.3) vulnerability in pydantic pydantic-settings. EPSS estimates a 0.18% chance of exploitation in the next 30 days, higher than 8.1% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 5.3, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Related 1Timeline
- 06-07-2026PublishedVulnerability first disclosed.
- 06-07-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · PypiEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- OSV · UbuntuEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- OSV · DebianEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- OSV · WolfiEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- OSV · ChainguardEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- NVDNIST5.3MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
EPSS trend
Probability
0.18%
Chance of exploitation in the next 30 days
Percentile
8%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.18% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundPydantic Settings
Maturity: poc
Weaknesses
CWE · root cause- CWE-22Improper Limitation of a Pathname to a Restricted DirectoryThe product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- CWE-59Improper Link Resolution Before File AccessThe product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
- CWE-400Uncontrolled Resource ConsumptionThe product does not properly control the allocation and maintenance of a limited resource.
Affected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard5 products
- py3-pydanticAll versions (No fix recorded)
- py3.10-pydanticAll versions (No fix recorded)
- py3.11-pydanticAll versions (No fix recorded)
- py3.12-pydanticAll versions (No fix recorded)
- py3.13-pydanticAll versions (No fix recorded)
Wolfi5 products
- py3-pydanticAll versions (No fix recorded)
- py3.10-pydanticAll versions (No fix recorded)
- py3.11-pydanticAll versions (No fix recorded)
- py3.12-pydanticAll versions (No fix recorded)
- py3.13-pydanticAll versions (No fix recorded)
Debian1 product
- pydantic-settings< 2.14.2-1
Mageia1 product
- python-pydantic-settings< 2.14.2-1.mga10
Pydantic1 product
- pydantic-settings≥ 2.12.0, < 2.14.2
PyPI1 product
- pydantic-settings≥ 2.12.0, < 2.14.2
Ubuntu1 product
- pydantic-settingsAll versions (No fix recorded)
7 vendors · 15 products
References
10 links- github.com/pydantic/pydantic-settings/security/advisories/GHSA-4xgf-cpjx-pc3jX Refsource CONFIRMAdvisoryWEBREPORTExploitMitigationVendor Advisory