Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain write access to shared secrets_dir
-
DeliveryCreate symlink inside secrets_dir targeting sensitive host file
-
ExploitTrigger application settings reload (restart or live reload)
-
ExecutionNestedSecretsSettingsSource follows symlink outside directory boundary
-
PersistSensitive file contents loaded into application settings
-
ImpactData exposed via application behavior, logs, or API responses
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires two concrete conditions: (1) the application must instantiate NestedSecretsSettingsSource with secrets_nested_subdir=True - this is a non-default opt-in configuration, not enabled by default; (2) the attacker or a lower-privileged process must have write access to the configured secrets_dir, for example via a shared or world-writable mount. The CVSS PR:L confirms low-privileged local access is sufficient once these conditions are met. Exploitation is strictly local (AV:L) - remote unauthenticated exploitation is not possible. Deployments with secrets_nested_subdir omitted or set to False, or where secrets_dir is mounted read-only and owned exclusively by the application, are not exploitable regardless of library version. |
| Impact | The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L, score 5.3) accurately characterizes the attack surface: local access with low privileges is required, complexity is low, and no user interaction is needed. The partial C/I/A ratings reflect that the attacker reads files into application settings rather than gaining full filesystem read or write. No EPSS score was provided in the available intelligence, making probabilistic exploitation assessment unavailable. The absence of a KEV listing and any public POC lowers urgency relative to the CVSS score alone. Real-world risk is elevated in containerized or microservice environments - particularly Kubernetes deployments - where secrets are mounted as shared volumes and multiple workloads may have write access to the same mount. In tightly controlled environments where secrets_dir is owned exclusively by the application process, exploitation surface is minimal. The secrets_dir_max_size bypass adds an integrity and availability dimension that the base CVSS score partially captures but may understate in high-sensitivity deployments. |
| Exploit ScenarioDerived | A lower-privileged sidecar container or compromised process sharing a writable Kubernetes secrets volume creates a symbolic link inside the application's secrets_dir - for example, secrets/db/password -> /etc/shadow - and waits for the application to restart or reload configuration. When the application initializes NestedSecretsSettingsSource with secrets_nested_subdir=True, the symlink is followed and the contents of /etc/shadow are loaded into the db.password settings field, potentially surfacing in logs, error messages, or downstream API responses. No public POC has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 06, 2026
Symlink traversal in pydantic-settings 2.12.0-2.14.1 allows a local low-privileged attacker with write access to the configured secrets directory to read arbitrary files from the host filesystem into application settings when secrets_nested_subdir=True. The same code path also bypasses the secrets_dir_max_size loading cap, undermining an advertised safety control. No public exploit or CISA KEV listing exists; the vendor-released fix is version 2.14.2.
RemediationAI
Upgrade pydantic-settings to version 2.14.2, the vendor-confirmed fix per the GitHub Security Advisory GHSA-4xgf-cpjx-pc3j (https://github.com/pydantic/pydantic-settings/security/advisories/GHSA-4xgf-cpjx-pc3j). If an immediate upgrade is not feasible, disable the nested subdirectory feature by setting secrets_nested_subdir=False or omitting it from the source configuration; note this removes the ability to load hierarchically nested secrets from subdirectories. As an additional compensating control, mount secrets_dir as read-only or restrict write permissions to the owning application user only, preventing lower-privileged components from planting symlinks - this does not patch the traversal but removes the attacker's ability to create the malicious entry. Restricting secrets_dir to a dedicated ephemeral volume rather than a shared mount further limits lateral exposure in multi-tenant container environments.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
pydantic-settings is a Python configuration-management library built on Pydantic, commonly used in FastAPI and other modern Python applications to load secrets from files in a designated directory. The NestedSecretsSettingsSource component, when secrets_nested_subdir=True, recursively descends into subdirectories of secrets_dir to populate nested settings models. The root cause is CWE-22 (Path Traversal): the traversal logic follows symbolic links without validating that their resolved targets remain within the secrets_dir boundary, effectively breaking the directory jail. The affected CPE is cpe:2.3:a:pydantic:pydantic-settings:*:*:*:*:*:*:*:* for versions 2.12.0 through 2.14.1. A secondary consequence is that the same traversal bypasses the documented secrets_dir_max_size guard, meaning an attacker can also cause the application to ingest arbitrarily large files, defeating a defense-in-depth control.
Know when Pydantic gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Write access to secrets_dir required (PR:L, AV:L); partial C/I/A since impact is limited to settings-loaded file contents and size-cap bypass.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
pydantic-settings provides settings management using Pydantic. From 2.12.0 until 2.14.2, 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 vulnerability is fixed in 2.14.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w
Pydantic AI versions 0.0.26 through 1.55.x contain a server-side request forgery vulnerability in URL download functiona
Regular expression denial of service in Pydanic < 2.4.0, < 1.10.13 allows remote attackers to cause denial of service vi
HTTPX2's SOCKS5 proxy implementation omits TLS negotiation for WebSocket Secure (wss://) origins, exposing the full WebS
Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit whil
Concurrency slot exhaustion in Pydantic AI 2.10.0 through 2.52.x lets streamed model requests permanently occupy slots i
Memory exhaustion via unbounded decompression in HTTPX2 (all versions before 2.12.0) allows any HTTP server the client c
Pydantic is a data validation and settings management using Python type hinting. Rated high severity (CVSS 7.5), this vu
Server-Side Request Forgery in Pydantic AI (versions 1.56.0-1.101.0, 2.0.0b1, 2.0.0b2) allows unauthenticated network at
Server-side request forgery in Pydantic AI's URL-fetching guards lets an application that has explicitly opted a URL int
Server-Side Request Forgery in Pydantic AI's UI adapter layer (versions 1.65.0-1.105.0 and 2.0.0b1-2.0.0b5) allows unaut
Pydantic AI, a Python framework for building Generative AI agents, buffers complete HTTP response bodies before applying
EUVD-2026-41878
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB