Skip to main content
CVE-2026-58203VulnerabilityPublished Updated

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

Affects fastmcpSource GCVE Database

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

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

Data as of 3 Nov 2026, 22:58 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 8% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 3.4.2_2
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 3 Nov 2026.

What to do

Upgrade fastmcp to 3.4.2_2.

Affected software

ProductAffectedFixed in
Homebrewfastmcppkg:brew/fastmcpOther threatsAffected
  • >=2.13.1 <3.4.2_2
Fixed in
  • 3.4.2_2

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 3.4.2_2 or later, which fixes the vulnerability by restricting directory traversal to paths within the secrets_dir and using a consistent, cycle-safe iterator for size checking and loading. If upgrading is not immediately possible, ensure the secrets_dir is fully controlled and not writable by untrusted users or components, or disable secrets_nested_subdir=True to avoid following symlinks.

Description

The pydantic-settings library's NestedSecretsSettingsSource component has a vulnerability where symbolic links inside a configured secrets directory can point outside that directory, allowing unintended local file reads. This also bypasses the configured maximum size limit for secrets loading, potentially leading to resource exhaustion. The flaw arises from inconsistent directory traversal methods used for size checking and loading secrets. An attacker able to place symlinks inside the secrets directory can exploit this to read arbitrary local files into application settings. The issue is fixed in pydantic-settings version 3.4.2_2.

References

Community reviews

Loading reviews…