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

Published Jul 6, 2026
·
Updated

pydantic-settings provides settings management using Pydantic. From 2.12.0 until 2.14.2, NestedSecretsSettingsSource reads secret values from files in a configured secretsdir. When secretsnestedsubdir=True, a directory entry inside secretsdir that is a symbolic link pointing outside secretsdir is followed, so files outside the configured directory are read into settings values. The same code path bypasses the documented secretsdirmaxsize 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.

Affected Software

2 affected components
Pydantic pydantic-settings>=2.12.0<2.14.2
Pydantic pydantic-settings>=2.12.0<2.14.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pydantic-settings/NestedSecretsSettingsSource to a version that resolves this vulnerability.

    Fixed in 2.14.2
  2. Compensating control

    Ensure the configured secrets_dir is not writable by an attacker/lower-privileged component and prevent symlink entries inside secrets_dir from pointing outside secrets_dir (especially when secrets_nested_subdir=True) to mitigate local file read and bypass of secrets_dir_max_size.

Event History

Jul 6, 2026
CVE Published
via MITRE·02:24 PM
Data Sourced
via MITRE·02:24 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeaknessAffected Software
Aug 5, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-58203?

The severity of CVE-2026-58203 is rated as medium with a score of 5.3.

2

What does CVE-2026-58203 exploit?

CVE-2026-58203 exploits a path traversal vulnerability in NestedSecretsSettingsSource allowing local file reading.

3

How do I fix CVE-2026-58203?

To fix CVE-2026-58203, update pydantic-settings to version 2.14.3 or later.

4

What are the potential impacts of CVE-2026-58203?

The potential impacts of CVE-2026-58203 include unauthorized access to sensitive files and a bypass of the secrets_dir_max_size.

5

Which versions of pydantic-settings are affected by CVE-2026-58203?

Versions of pydantic-settings from 2.12.0 to 2.14.2 are affected by CVE-2026-58203.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203