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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.34% (percentile 72, 2026-11-26)
- **CWE:** CWE-915, CWE-20
- **Aliases:** GHSA-f964-whrq-44h8, PYSEC-2026-2247
- **Published:** 2026-03-19T16:27:43.000Z
- **Modified:** 2026-07-13T07:26:39.416Z

## Who should check

- Projects that depend on PyPI package ormar (\< 0.23.1)
- Anyone running ormar-orm ormar \< 0.23.1

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

- PyPI `ormar`: affected \< 0.23.1; fixed 0.23.1 (osv)
- ormar-orm ormar: \< 0.23.1 (cvelist)

## Mitigation

- Upgrade ormar to 0.23.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

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

## References

- vendor: <https://github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8>
- vendor: <https://github.com/ormar-orm/ormar/releases/tag/0.23.1>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-27953>
- patch: <https://github.com/ormar-orm/ormar/commit/7f22aa21a7614b993970345b392dabb0ccde0ab3>
- patch: <https://github.com/ormar-orm/ormar/blob/master/examples/fastapi_quick_start.py#L55>
- patch: <https://github.com/ormar-orm/ormar/blob/master/ormar/fields/foreign_key.py#L41>
- patch: <https://github.com/ormar-orm/ormar/blob/master/ormar/models/helpers/pydantic.py#L108>
- patch: <https://github.com/ormar-orm/ormar/blob/master/ormar/models/model.py#L89>
- patch: <https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L128>
- patch: <https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L292>
- other: <https://github.com/ormar-orm/ormar>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-27953>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-f964-whrq-44h8> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-2247> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-27953> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-27953>
