CVE-2026-27953
ormar has a Pydantic Validation Bypass via Kwargs Injection in Model Constructor
Also known as GHSA-f964-whrq-44h8, PYSEC-2026-2247
Mitigation
- Upgrade ormar to 0.23.1 or later.
Who should check
- Projects that depend on PyPI package ormar (< 0.23.1)
- Anyone running ormar-orm ormar < 0.23.1
Vulnerability facts
- Affected
- ormar < 0.23.1
- Fixed in
- 0.23.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 7.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: High
- Availability impact: Low
- EPSS
- 1.34% chance of exploitation in 30 days (percentile 72, 2026-11-26)
- CWE
- CWE-915, CWE-20
- Modified
Description
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-27953. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-27953.md Affected: ormar < 0.23.1 Fixed in: 0.23.1 Steps: 1. Search this machine and project for ormar (PyPI), ormar-orm ormar: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
- https://github.com/ormar-orm/ormar/commit/7f22aa21a7614b993970345b392dabb0ccde0ab3
- 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
FAQ
Is CVE-2026-27953 being exploited?
There is no confirmed exploitation: CVE-2026-27953 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.34% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-27953?
High: CVSS 7.1 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2026-27953?
ormar < 0.23.1.
Is there a fix for CVE-2026-27953?
Yes. Fixed in 0.23.1. Upgrade ormar to 0.23.1 or later.
How do I check if I'm affected by CVE-2026-27953?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.