CVE-2026-27953
ormar has a Pydantic Validation Bypass via Kwargs Injection in Model Constructor
Check your servers for CVE-2026-27953
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-27953 affects ormar, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity high, availability low: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.36%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 72.4% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 20 Mar 2026):
- Exploitation
- poc: a proof of concept is public
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-20 Improper Input Validation
- CWE-915 Improperly Controlled Modification of Dynamically-Determined Object Attributes
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of ormar and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i ormar
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-27953 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-27953RHEL, Rocky, Alma, Fedora
rpm -q ormar
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-27953Alpine
apk list --installed | grep -i ormarWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-27953
trivy image --scanners vuln IMAGE | grep CVE-2026-27953
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Exploits and proof of concept
- https://github.com/ormar-orm/ormar/security/advisories/GHSA-f964-whrq-44h8 github.com · exploit
Other references
- https://github.com/ormar-orm/ormar/commit/7f22aa21a7614b993970345b392dabb0ccde0ab3 github.com
- https://github.com/ormar-orm/ormar/blob/master/examples/fastapi_quick_start.py#L55 github.com
- https://github.com/ormar-orm/ormar/blob/master/ormar/fields/foreign_key.py#L41 github.com
- https://github.com/ormar-orm/ormar/blob/master/ormar/models/helpers/pydantic.py#L108 github.com
- https://github.com/ormar-orm/ormar/blob/master/ormar/models/model.py#L89 github.com
- https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L128 github.com
- https://github.com/ormar-orm/ormar/blob/master/ormar/models/newbasemodel.py#L292 github.com
- https://github.com/ormar-orm/ormar/releases/tag/0.23.1 github.com
Source: the record CVE-2026-27953 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse