moto · pydantic-settings: NestedSecretsSettingsSource follows symlinks outside secrets_dir, enabling local file read and
Affects motoSource GCVE Database
Not known to be exploited · CVSS 5.3 Medium : upgrade to 5.2.2_1 when convenient.
Data as of 30 Oct 2026, 06:59 UTC
- 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 5.2.2_1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:LExploitation evidence
Disclosed: evidence found.
CVE published 6 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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 29 Oct 2026.
What to do
Upgrade moto to 5.2.2_1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewmotopkg:brew/motoOther threats | Affected
| Fixed in
|
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 5.2.2_1 or later, which enforces strict directory traversal preventing symlinked directories from escaping the configured secrets_dir, uses a single cycle-safe iterator for size checking and loading, and skips files whose resolved paths escape secrets_dir. If upgrading is not immediately possible, ensure the secrets_dir is fully controlled by the application with no writable or attacker-influenced entries, or disable secrets_nested_subdir.
Description
The pydantic-settings library's NestedSecretsSettingsSource component improperly follows symbolic links inside a configured secrets directory that point outside this directory, allowing unintended local file reads. This behavior also bypasses the configured maximum size limit for secrets directories, potentially leading to resource exhaustion. The vulnerability requires the ability to place symlinks inside the secrets directory and is not remotely exploitable on its own. Applications using NestedSecretsSettingsSource with secrets_nested_subdir=True and a secrets directory writable or influenced by lower-privileged components are affected. The issue is fixed in pydantic-settings version 5.2.2_1.