# CVE-2026-27953: ormar has a Pydantic Validation Bypass via Kwargs Injection in Model Constructor

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.36%, higher than 72% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-19T16:27:43.000Z
- Modified: 2026-07-13T07:26:39.416Z
- Also known as: GHSA-f964-whrq-44h8, PYSEC-2026-2247
- Weaknesses: CWE-20, CWE-915
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- ormar-orm ormar: < 0.23.1
- ormar (PyPI): before 0.23.1
- collerek ormar: before 0.23.1

## Every score

- GitHub_M: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L`
- GitHub: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8> (exploit, evidence, mitigation, vendor-advisory, web)
- <https://github.com/ormar-orm/ormar/commit/7f22aa21a7614b993970345b392dabb0ccde0ab3> (fix, patch, web)
- <https://github.com/ormar-orm/ormar/blob/master/examples/fastapi_quick_start.py#L55> (fix, patch, web)
- <https://github.com/ormar-orm/ormar/blob/master/ormar/fields/foreign_key.py#L41> (fix, patch, web)
- <https://github.com/ormar-orm/ormar/blob/master/ormar/models/helpers/pydantic.py#L108> (fix, patch, web)
- <https://github.com/ormar-orm/ormar/blob/master/ormar/models/model.py#L89> (fix, patch, web)
- <https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L128> (fix, patch, web)
- <https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L292> (fix, patch, web)
- <https://github.com/ormar-orm/ormar/releases/tag/0.23.1> (advisory, product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-27953> (advisory)
- <https://github.com/ormar-orm/ormar> (package)

## Sources

- CVE List: [CVE-2026-27953](https://www.cve.org/CVERecord?id=CVE-2026-27953), CVE Terms of Use, modified 2026-03-20
- GitHub Advisory Database: [GHSA-f964-whrq-44h8](https://github.com/advisories/GHSA-f964-whrq-44h8), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-27953](https://nvd.nist.gov/vuln/detail/CVE-2026-27953), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2247](https://osv.dev/vulnerability/PYSEC-2026-2247), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-27953 · Whole record: https://cve.day/CVE-2026-27953.json · Rebuilt by cve.day 2026-11-25T22:59:16.187Z
