CVE-2025-67221: Orjson Orjson Does Not Limit Recursion Vulnerability
HIGHCVE-2025-67221 is a HIGH orjson does not limit recursion vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Orjson libraries in the PyPI ecosystem. The issue involves orjson does not limit recursion for deeply nested json documents. Remediation is available by upgrading affected packages to version 3.11.6.
CVE-2025-67221 at a Glance
How to Fix CVE-2025-67221
To remediate this vulnerability, upgrade all affected Orjson dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install orjson>=3.11.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show orjson
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-67221, inspect your installed packages using pip:
pip show orjson
Analyze the terminal output to locate any version of Orjson in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.11.6), your application is affected.
Note: The pip show orjson command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Orjson, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-67221 Affected Orjson Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
orjson
|
PyPI |
< 3.11.6
|
3.11.6
|
References
Frequently Asked Questions
What is CVE-2025-67221?
Which Orjson versions are affected?
What version fixes CVE-2025-67221?
Is orjson affected?
What CWE is associated with CVE-2025-67221?
How can I check PyPI dependencies for CVE-2025-67221?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hx9q-6w63-j58v",
"modified" : "2026-06-06T14:45:03Z",
"published" : "2026-01-22T18:30:33Z",
"aliases" : [ "CVE-2025-67221" ],
"summary" : "orjson does not limit recursion for deeply nested JSON documents",
"details" : "The orjson.dumps function in orjson before 3.11.6 does not limit recursion for deeply nested JSON documents.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "orjson"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.11.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-67221"
}, {
"type" : "WEB",
"url" : "https://github.com/ijl/orjson/issues/620"
}, {
"type" : "WEB",
"url" : "https://github.com/kpatsakis/CVE-2025-67221/issues/1"
}, {
"type" : "WEB",
"url" : "https://github.com/ijl/orjson/commit/62bb185b70785ded49c79c26f8c9781f1e6fe370"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ijl/orjson"
}, {
"type" : "WEB",
"url" : "https://github.com/kpatsakis/orjson_vulnerability"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/orjson/PYSEC-2026-107.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-22T18:55:43Z",
"nvd_published_at" : "2026-01-22T17:16:01Z"
}
}