gptme · pydantic-settings: NestedSecretsSettingsSource follows symlinks outside secrets_dir, enabling local file read and
Affects gptmeSource GCVE Database
Not known to be exploited · CVSS 5.3 Medium : upgrade to 0.31.0_13 when convenient.
Data as of 4 Nov 2026, 21:27 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 0.31.0_13
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 4 Nov 2026.
What to do
Upgrade gptme to 0.31.0_13.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewgptmepkg:brew/gptmeOther 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 0.31.0_13 or later, which fixes the issue by only descending into directories whose resolved paths remain within the configured secrets_dir, using a single cycle-safe iterator for size checking and loading, and skipping files outside secrets_dir as a defense in depth. If upgrading is not immediately possible, ensure the secrets_dir is fully controlled and not writable by untrusted users or components, or avoid using secrets_nested_subdir=True.
Description
The pydantic-settings library's NestedSecretsSettingsSource component has a vulnerability when used with secrets_nested_subdir=True. It follows symbolic links inside the configured secrets_dir that point outside this directory, allowing reading of files outside the intended secrets directory. This also bypasses the secrets_dir_max_size limit, enabling oversized files to be loaded. The issue arises from inconsistent directory traversal methods used for size checking and loading, and can be exploited if an attacker or lower-privileged component can place symlinks inside the secrets directory. The vulnerability is local and requires write access to the secrets directory. A fix is available in version 0.31.0_13.