CVE-2026-27953
ormar is a async mini ORM for Python. Versions 0.23.0 and below are vulnerable to Pydantic validation bypass through the model constructor, allowing any unauthenticated user to skip all field validation by injecting "__pk_only__": true into a JSON request body. By injecting "__pk_only__": true into a JSON request body, an unauthenticated attacker can skip all field validation and persist unvalidated data directly to the database. A secondary __excluded__ parameter injection uses the same pattern to selectively nullify arbitrary model fields (e.g., email or role) during construction.
Leer descripción completaMostrar menos
This affects ormar's canonical FastAPI integration pattern recommended in its official documentation, enabling privilege escalation, data integrity violations, and business logic bypass in any application using ormar.Model directly as a request body parameter. This issue has been fixed in version 0.23.1.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Puntuación base: 9.8
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.91%
- Percentil entre todas las CVEs puntuadas: 58
- Fecha de la puntuación: 5/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
🎯 Técnicas ATT&CK
Cómo se explota esta vulnerabilidad y qué consigue el atacante, en el lenguaje de MITRE ATT&CK.
- Explotación
T1190Exploit Public-Facing Applicationinitial access95 % - Impacto principal
T1565.003Runtime Data Manipulationimpact90 % - Impacto secundario
T1068Exploitation for Privilege Escalationprivilege escalation85 %
Vulnerabilidad de validación en ORM expuesto vía API REST (AV:N, PR:N, UI:N). Inyección de parámetros bypassa validación Pydantic, persistiendo datos malformados en BD (T1565.003), escalando privilegios (T1068) y suplantando roles (T1078.001).
Inferido por nuestro agente de análisis a partir de la descripción oficial, el vector CVSS y la CWE, y comprobado por un supervisor. Puede contener errores.
🛡️ Mitigaciones ATT&CK que cubren estas técnicas
Tecnologías afectadas (1)
CWE
- CWE-20, CWE-915
Referencias
- https://github.com/ormar-orm/ormar/blob/master/examples/fastapi_quick_start.py#L55
- https://github.com/ormar-orm/ormar/blob/master/ormar/fields/foreign_key.py#L41
- https://github.com/ormar-orm/ormar/blob/master/ormar/models/helpers/pydantic.py#L108
- https://github.com/ormar-orm/ormar/blob/master/ormar/models/model.py#L89
- https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L128
- https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L292
- https://github.com/ormar-orm/ormar/commit/7f22aa21a7614b993970345b392dabb0ccde0ab3
- https://github.com/ormar-orm/ormar/releases/tag/0.23.1
- https://github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8
- https://github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8
JSON original (NVD)
Mostrar
{
"id": "CVE-2026-27953",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2026-27953",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-03-20T17:04:35.323858Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 7.1,
"attackVector": "NETWORK",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "LOW",
"privilegesRequired": "LOW",
"confidentialityImpact": "NONE"
},
"impactScore": 4.2,
"exploitabilityScore": 2.8
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 9.8,
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "security-advisories@github.com",
"affectedData": [
{
"vendor": "ormar-orm",
"product": "ormar",
"versions": [
{
"status": "affected",
"version": "< 0.23.1"
}
]
}
]
}
],
"published": "2026-03-19T21:17:09.573",
"references": [
{
"url": "https://github.com/ormar-orm/ormar/blob/master/examples/fastapi_quick_start.py#L55",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/blob/master/ormar/fields/foreign_key.py#L41",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/blob/master/ormar/models/helpers/pydantic.py#L108",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/blob/master/ormar/models/model.py#L89",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L128",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L292",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/commit/7f22aa21a7614b993970345b392dabb0ccde0ab3",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/releases/tag/0.23.1",
"tags": [
"Product",
"Release Notes"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8",
"tags": [
"Exploit",
"Mitigation",
"Vendor Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8",
"tags": [
"Exploit",
"Mitigation",
"Vendor Advisory"
],
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
}
],
"vulnStatus": "Analyzed",
"weaknesses": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"description": [
{
"lang": "en",
"value": "CWE-20"
},
{
"lang": "en",
"value": "CWE-915"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "ormar is a async mini ORM for Python. Versions 0.23.0 and below are vulnerable to Pydantic validation bypass through the model constructor, allowing any unauthenticated user to skip all field validation by injecting \"__pk_only__\": true into a JSON request body. By injecting \"__pk_only__\": true into a JSON request body, an unauthenticated attacker can skip all field validation and persist unvalidated data directly to the database. A secondary __excluded__ parameter injection uses the same pattern to selectively nullify arbitrary model fields (e.g., email or role) during construction. This affects ormar's canonical FastAPI integration pattern recommended in its official documentation, enabling privilege escalation, data integrity violations, and business logic bypass in any application using ormar.Model directly as a request body parameter. This issue has been fixed in version 0.23.1."
},
{
"lang": "es",
"value": "ormar es un mini ORM asíncrono para Python. Las versiones 0.23.0 e inferiores son vulnerables a un bypass de validación de Pydantic a través del constructor del modelo, permitiendo a cualquier usuario no autenticado omitir toda la validación de campos inyectando '__pk_only__': true en un cuerpo de solicitud JSON. Al inyectar '__pk_only__': true en un cuerpo de solicitud JSON, un atacante no autenticado puede omitir toda la validación de campos y persistir datos no validados directamente en la base de datos. Una inyección de parámetro secundaria __excluded__ utiliza el mismo patrón para anular selectivamente campos de modelo arbitrarios (p. ej., correo electrónico o rol) durante la construcción. Esto afecta el patrón canónico de integración de FastAPI de ormar recomendado en su documentación oficial, permitiendo la escalada de privilegios, violaciones de integridad de datos y bypass de lógica de negocio en cualquier aplicación que utilice ormar.Model directamente como parámetro del cuerpo de la solicitud. Este problema ha sido solucionado en la versión 0.23.1."
}
],
"lastModified": "2026-06-17T10:27:58.157",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:collerek:ormar:*:*:*:*:*:python:*:*",
"vulnerable": true,
"matchCriteriaId": "28060AA9-6E58-42EE-9043-CC3998D6B0ED",
"versionEndExcluding": "0.23.1"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security-advisories@github.com"
}