Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pydantic-settings
  4. ›
  5. GHSA-4xgf-cpjx-pc3j

GHSA-4xgf-cpjx-pc3j: pydantic-settings: NestedSecretsSettingsSource follows symlinks outside secrets_dir, enabling local file read and bypassing secrets_dir_max_size

June 19, 2026 (updated June 20, 2026)

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 report does not claim network reachability by itself.

References

  • github.com/advisories/GHSA-4xgf-cpjx-pc3j
  • github.com/pydantic/pydantic-settings/security/advisories/GHSA-4xgf-cpjx-pc3j

Code Behaviors & Features

Detect and mitigate GHSA-4xgf-cpjx-pc3j with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 2.12.0 before 2.14.2

Fixed versions

  • 2.14.2

Solution

Upgrade to version 2.14.2 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-400: Uncontrolled Resource Consumption
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')

Source file

pypi/pydantic-settings/GHSA-4xgf-cpjx-pc3j.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:19 +0000.