mediumCVE-2026-58203

CVE-2026-58203 pydantic vulnerability

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.

Productpydantic
CVSS5.3
EPSS0.00138
UpdatedJuly 13, 2026

Quick answer

pydantic should be reviewed and updated if it matches the affected versions. The recommended fix is to apply the vendor-supported patched version or the mitigation steps below, then retest the public website with Fixnx.

Who is affected

Affected versions

  • Review vendor advisory for affected versions.

Fixed versions

  • Apply the latest vendor-supported patched version.

How to fix it

pydantic-settings is affected by CVE-2026-58203, a symlink-based file disclosure risk. pydantic-settings provides settings management using Pydantic. The recommended remediation is to update to pydantic-settings 2.14.2 or later. Until the update is complete, disable secrets_nested_subdir or reject symlinks inside secrets_dir until patched, review logs, and reduce exposure of the affected package, route, provider, or service workflow.

  1. Inventory every deployment, package, dependency, build runner, integration, route, service, and managed environment that uses pydantic-settings.
  2. Confirm the installed version/build and compare it with versions from 2.12.0 through 2.14.2 and the source advisory for CVE-2026-58203.
  3. Apply the vendor-supported fix: update to pydantic-settings 2.14.2 or later.
  4. If the update cannot be applied immediately, disable secrets_nested_subdir or reject symlinks inside secrets_dir until patched; disable unnecessary public access, package-install paths, file processing, webhooks, message consumers, or high-risk integrations until patched.
  5. Review application, CI/CD, package manager, container, reverse-proxy, WAF, authentication, route, and audit logs for activity related to CVE-2026-58203.
  6. Rotate sessions, API tokens, package registry credentials, cloud credentials, webhook secrets, service credentials, and administrator passwords if logs or affected data indicate compromise, credential exposure, or unauthorized access.
  7. Clear caches, restart affected services, rebuild affected containers or build agents when appropriate, and remove temporary files, malicious artifacts, stored payloads, or unsafe configuration created during exploitation attempts.

Scan now. Google sign-in is only needed to unlock fix guidance.

Verify the fix

  • Confirm pydantic-settings now reports pydantic-settings 2.14.2 or later or a later vendor-supported fixed release/build for the deployed branch.
  • Verify the affected workflow no longer allows the behavior described in CVE-2026-58203, using a safe regression test, dependency inventory, or vendor validation method.
  • Review logs after remediation for continued exploit attempts, denial-of-service symptoms, suspicious redirects, unauthorized requests, path traversal, header manipulation, credential exposure, or configuration changes.
  • Rerun a Fixnx scan and any product-specific scanner, package audit, dependency check, route regression test, or integration test relevant to the affected service.
  • Document affected assets, fixed versions, mitigation decisions, validation evidence, and any cleanup, rebuild, or credential rotation performed.

Related categories

Trusted references

FAQ

What is affected by CVE-2026-58203?

pydantic should be checked against the vendor advisory and trusted references linked on this page.

What should I fix first?

Start with internet-facing sites, admin panels, login flows, plugins, themes, modules, packages, and systems that process user-controlled input or sensitive data.

How do I confirm the fix worked?

Apply the patched version or mitigation, clear caches where relevant, retest the affected workflow, and run a new Fixnx scan to verify public website exposure signals.

How are Fixnx security risk categories chosen?

Fixnx keeps one canonical risk page and assigns only broad, relevant categories such as ecosystem, technology area, or vulnerability class.