← Back to CVE Explorer

CVE-2026-58203

Full vulnerability record from the local CVENow database.

Description

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.

Severity
MEDIUM
CVSS score
5.3 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-07-06 16:16:35.590000
Last modified
2026-10-25 20:10:00.147000
View original CVE JSON
{
  "id": "CVE-2026-58203",
  "sourceIdentifier": "[email protected]",
  "published": "2026-07-06T16:16:35.590",
  "lastModified": "2026-10-25T20:10:00.147",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "pydantic-settings proporciona gestión de configuraciones utilizando Pydantic. Desde 2.12.0 hasta 2.14.2, NestedSecretsSettingsSource lee valores secretos de archivos en un secrets_dir configurado. Cuando secrets_nested_subdir=True, se sigue una entrada de directorio dentro de secrets_dir que es un enlace simbólico que apunta fuera de secrets_dir, por lo que los archivos fuera del directorio configurado se leen como valores de configuración. La misma ruta de código omite la protección documentada secrets_dir_max_size. Un atacante o un componente con privilegios inferiores capaz de influir en las entradas del directorio de secretos configurado (por ejemplo, un montaje de secretos escribible o compartido) puede convertir esto en una lectura de archivo local no intencionada en la configuración y puede anular el límite de tamaño de carga anunciado. Esta vulnerabilidad está corregida en 2.14.2."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "pydantic",
          "product": "pydantic-settings",
          "versions": [
            {
              "version": ">= 2.12.0, < 2.14.2",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
          "baseScore": 5.3,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "LOW",
          "integrityImpact": "LOW",
          "availabilityImpact": "LOW"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.4
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-06T16:19:35.619669Z",
          "id": "CVE-2026-58203",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-22"
        },
        {
          "lang": "en",
          "value": "CWE-59"
        },
        {
          "lang": "en",
          "value": "CWE-400"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:pydantic:pydantic-settings:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "2.12.0",
              "versionEndExcluding": "2.14.2",
              "matchCriteriaId": "931D9026-D16A-4D64-AF95-ADB223F74EFA"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/pydantic/pydantic-settings/security/advisories/GHSA-4xgf-cpjx-pc3j",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/pydantic/pydantic-settings/security/advisories/GHSA-4xgf-cpjx-pc3j",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    }
  ]
}