# CVE-2026-58203: NestedSecretsSettingsSource follows symlinks outside secrets_dir, enabling local file read and bypassing secrets_dir_max_size

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 9% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-19T22:10:42.000Z
- Modified: 2026-10-25T20:10:00.147Z
- Also known as: GHSA-4xgf-cpjx-pc3j
- Weaknesses: CWE-22, CWE-59, CWE-400
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- pydantic pydantic-settings: >= 2.12.0, < 2.14.2; from 2.12.0 before 2.14.2
- pydantic-settings (PyPI): from 2.12.0 before 2.14.2

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`

## References

- <https://github.com/pydantic/pydantic-settings/security/advisories/GHSA-4xgf-cpjx-pc3j> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/pydantic/pydantic-settings> (package)

## Sources

- CVE List: [CVE-2026-58203](https://www.cve.org/CVERecord?id=CVE-2026-58203), CVE Terms of Use, modified 2026-07-06
- GitHub Advisory Database: [GHSA-4xgf-cpjx-pc3j](https://github.com/advisories/GHSA-4xgf-cpjx-pc3j), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-58203](https://nvd.nist.gov/vuln/detail/CVE-2026-58203), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-58203 · Whole record: https://cve.day/CVE-2026-58203.json · Rebuilt by cve.day 2026-11-25T22:59:27.229Z
