OrmarApplication · Collerek

CVE-2026-27953

CRITICAL · 9.8 CVSS v3.1 Published 2026-03-19
Fix available
A fix is available. Upgrade to 0.23.1 or later.
See remediation →
100/100
Remediation priority · Urgent
Public exploit Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The ormar async ORM for Python versions 0.23.0 and below allows attackers to bypass Pydantic field validation by injecting '__pk_only__: true' into JSON request bodies, persisting unvalidated data directly to the database. A secondary '__excluded__' parameter enables nullifying arbitrary fields like email or role during model construction.

MitigationUpgrade ormar to version 0.23.1 or later to patch the validation bypass vulnerability.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
OrmarApplication
Affected:< 0.23.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify ormar library version
    Run 'pip show ormar' or check your requirements.txt/poetry.lock file for the installed ormar package version
    Affected if The installed version is below 0.23.1 (e.g., 0.23.0, 0.22.0, etc.)
  2. Find FastAPI endpoints using ormar.Model as request body
    Search your codebase for FastAPI route definitions (e.g., @app.post, @app.put) where the request body type is set directly to an ormar.Model class (e.g., 'body: MyOrmarModel')
    Affected if Any endpoint accepts ormar.Model as the direct request body parameter type without an intermediate Pydantic model
  3. Inspect JSON request body handling
    Review the endpoint handler code to see if the incoming JSON request body is passed directly to ormar methods like .save(), .create(), or .update() without prior validation
    Affected if JSON data from requests is persisted via ormar without passing through a Pydantic model validation layer first
  4. Check for __pk_only__ and __excluded__ parameter handling
    Search your codebase or API logs for any usage or attempted injection of '__pk_only__' or '__excluded__' parameters in JSON request bodies to endpoints using ormar.Model
    Affected if These special parameters can be sent in requests and are processed by ormar, bypassing normal field validation

You are affected if your application uses ormar version below 0.23.1 AND has FastAPI endpoints that accept ormar.Model directly as request body parameters without an intermediate Pydantic validation layer.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 0.23.1 or later
Fixed in 0.23.1
Vendor patch github.com →
Interim mitigation

Upgrade ormar to version 0.23.1 or later to patch the validation bypass vulnerability.

Recommended fix High confidence

0.23.1 or later

  1. Upgrade ormar to version 0.23.1 or later using pip: pip install ormar>=0.23.1
  2. Verify the upgrade was successful by checking the installed version: pip show ormar
  3. Test that FastAPI endpoints using ormar.Model as request body parameters now properly validate all fields
Caveat Review application logic that may have relied on the vulnerable behavior; minor version upgrade should not introduce breaking changes

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Ormar Scoped from the published advisory
  • Consultation4.0 h
  • Implementation2.0 h
  • Testing6.0 h
  • Review / QA3.0 h
15.0 hours of engineering $2,600
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,160.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-27953 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-27953 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data