Skip to main content
CVE-2026-58203VulnerabilityPublished Updated

semgrep · pydantic-settings: NestedSecretsSettingsSource follows symlinks outside secrets_dir, enabling local file read and

Affects semgrepSource GCVE Database

0
Compare
Authoritative record:CVE-2026-58203· Medium 5.3

Not known to be exploited · CVSS 5.3 Medium : upgrade to 1.168.0 when convenient.

Data as of 31 Oct 2026, 16:22 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 1.168.0
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 6 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade semgrep to 1.168.0.

Affected software

ProductAffectedFixed in
Homebrewsemgreppkg:brew/semgrepOther threatsAffected
  • >=1.143.0 <1.168.0
Fixed in
  • 1.168.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade to pydantic-settings version 1.168.0 or later, which fixes the issue by restricting directory traversal to paths within the configured secrets_dir and using a consistent, cycle-safe iterator for size checking and loading. If upgrading is not immediately possible, ensure that the configured secrets_dir is fully controlled and not writable by untrusted users or components, or disable the secrets_nested_subdir option to avoid following symlinks.

Description

The pydantic-settings library's NestedSecretsSettingsSource component improperly follows symbolic links inside a configured secrets directory that point outside this directory, allowing local files outside the intended secrets directory to be read into application settings. This behavior also bypasses the configured maximum size limit for secrets loading, potentially leading to excessive resource consumption. The vulnerability requires the ability to place symlinks inside the secrets directory and is not remotely exploitable on its own. It affects versions from 1.143.0 up to but not including 1.168.0. A fix is available in version 1.168.0.

References

Community reviews

Loading reviews…