CVE-2026-27953 json
ormar has a Pydantic Validation Bypass via Kwargs Injection in Model Constructor
published 2026-03-19 7 mo ago modified 2026-07-13 3 mo ago also GHSA-f964-whrq-44h8 , PYSEC-2026-2247 , EUVD-2026-13198
- cvss
- 7.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 69%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi ormar 0.23.1
- collerek ormar 0.23.1
- ormar Debian 14 0.23.1-1
debian advisories DEBIAN-CVE-2026-27953
- github.com/ormar-orm/ormar@7f22aa2 commit
- github.com/ormar-orm/ormar/blob/master/examples/fastapi_quick_start.p… patch
- github.com/ormar-orm/ormar/blob/master/ormar/fields/foreign_key.py#L41 patch
- github.com/ormar-orm/ormar/blob/master/ormar/models/helpers/pydantic.… patch
- github.com/ormar-orm/ormar/blob/master/ormar/models/model.py#L89 patch
- github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L… patch
- github.com/ormar-orm/ormar/releases/tag/0.23.1 release
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 7 mo ago
Exploit prediction
1.24% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 7.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | ormar | <0.23.1 |
0.23.1 |
Affected products
- ormar-orm ormar
Classification
References
-
github.com
/ormar-orm/ormar/commit/7f22aa21a7614b993970345b392dabb0ccde0ab3
web, patch
-
github.com
/ormar-orm/ormar/blob/master/examples/fastapi_quick_start.py#L55
web, patch
-
github.com
/ormar-orm/ormar/blob/master/ormar/fields/foreign_key.py#L41
web, patch
-
github.com
/ormar-orm/ormar/blob/master/ormar/models/helpers/pydantic.py#L108
web, patch
-
github.com
/ormar-orm/ormar/blob/master/ormar/models/model.py#L89
web, patch
-
github.com
/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L128
web, patch
-
github.com
/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L292
web, patch
-
github.com
/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8
exploit, web, mitigation, vendor-advisory, evidence
-
github.com
/ormar-orm/ormar/releases/tag/0.23.1
web, product, release-notes, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-27953
advisory
-
github.com
/ormar-orm/ormar
package
Sources
- CVE List CVE-2026-27953
- GitHub Advisory GHSA-f964-whrq-44h8
- NVD CVE-2026-27953
- OSV PYSEC-2026-2247
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.