CVE-2026-27953: ormar · Mass Assignment
Affects ormarSource CVE Database V5
Not known to be exploited · CVSS 7.1 High : upgrade to 0.23.1 soon.
Data as of 31 Oct 2026, 08:20 UTC
- EPSS
- 1.2% chance of exploitation in 30 days – higher than 68% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.23.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:LExploitation evidence
Disclosed: evidence found.
CVE published 19 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade ormar to 0.23.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| ormar-ormormar | Affected
| Fixed in
|
PyPIormarpkg:pypi/ormarOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
- Immediate upgrade of ormar to version 0.23.1 or later to apply the official patch that fixes the validation bypass.
- Review and audit all FastAPI endpoints that use ormar.Model as a request body parameter to ensure no unvalidated or dynamic attributes can be injected.
- Implement additional server-side validation layers independent of ormar's model validation to detect and reject unexpected parameters like "__pk_only__" or "__excluded__".
- Employ strict input sanitization and schema validation at the API gateway or middleware level to prevent injection of special control parameters.
- Monitor application logs for suspicious requests containing these special parameters or anomalous data modifications.
- Conduct penetration testing focusing on model validation bypass attempts to verify the effectiveness of mitigations.
- Educate development teams about the risks of relying solely on ORM-level validation and encourage defense-in-depth strategies.
- If upgrading immediately is not feasible, consider temporarily disabling ormar.Model direct usage as request bodies and replace with explicit Pydantic schemas that do not allow dynamic attribute injection.
Description
CVE-2026-27953 is a high-severity vulnerability in ormar, an async mini ORM for Python, affecting versions below 0.23.1. It allows unauthenticated attackers to bypass Pydantic model validation by injecting the "__pk_only__": true parameter in JSON request bodies, enabling direct persistence of unvalidated data to the database. A secondary injection parameter "__excluded__" can nullify arbitrary model fields, facilitating privilege escalation, data integrity violations, and business logic bypass. This vulnerability impacts applications using ormar. Model directly as a request body parameter, especially in FastAPI integrations following ormar's official documentation. The issue has been fixed in version 0.23.1.
References
- github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8 (opens in a new tab)
- github.com/ormar-orm/ormar/commit/7f22aa21a7614b993970345b392dabb0ccde0ab3 (opens in a new tab)
- github.com/ormar-orm/ormar/blob/master/examples/fastapi_quick_start.py (opens in a new tab)
- github.com/ormar-orm/ormar/blob/master/ormar/fields/foreign_key.py (opens in a new tab)
- github.com/ormar-orm/ormar/blob/master/ormar/models/helpers/pydantic.py (opens in a new tab)
- github.com/ormar-orm/ormar/blob/master/ormar/models/model.py (opens in a new tab)
- github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py (opens in a new tab)
- github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py (opens in a new tab)
- github.com/ormar-orm/ormar/releases/tag/0.23.1 (opens in a new tab)