Medium [CVE-2026-58203] NestedSecretsSettingsSource follows symlinks outside secrets_dir, enabling local file read and bypassing secrets_dir_max_size
This medium-severity Red Hat Linux advisory covers CVE-2026-58203 affecting Migration Toolkit for Applications 8, OpenShift Lightspeed, Red Hat AI Inference Server.
Android app · Google Play
Monitor future Red Hat Linux CVEs from your phone.
Choose a whole vendor or a precise platform, then receive matching security advisories by phone notification, email, or both. Coverage follows 32 official vendor sources and 160+ reviewed platform categories.
Summary
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.
When configured to handle nested secrets, this vulnerability allows an attacker to read sensitive files from outside the designated secrets directory. By placing a specially crafted symbolic link within the secrets directory, an attacker can trick the system into accessing unauthorized files.
This issue also bypasses a safeguard designed to limit the size of loaded secrets, potentially leading to unexpected resource usage. This vulnerability requires an attacker to have the ability to modify entries within the secrets directory.
Affected versions
No affected-version range was extracted from the source record. The vendor advisory is authoritative — check it before change work.
Official advisory · high-confidence parse· fetched 11 days ago·verify at source
Mitigation checklist
- To mitigate this issue, ensure that the `secrets_dir` used by `pydantic-settings` with `NestedSecretsSettingsSource` is exclusively controlled by the application, preventing any unauthorized modifications or symlink placements. Alternatively, disable the `secrets_nested_subdir=True` option if nested secret subdirectories are not essential for your application's functionality.
Official advisory · high-confidence parse· fetched 11 days ago·verify at source
Discussion(0)
No comments yet. Share field notes, upgrade gotchas, or questions — verify against the vendor advisory before acting on community advice.
Sign in to join the discussion.