CVE-2010-1666: Python cjson Improper Restriction Of Operations Within Vulnerability
MODERATECVE-2010-1666 is a MODERATE improper restriction of operations within vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Python cjson libraries in the PyPI ecosystem. The issue involves improper restriction of operations within the bounds of a memory buffer in python-cjson. Remediation is available by upgrading affected packages to version 1.0.5.1.
CVE-2010-1666 at a Glance
How to Fix CVE-2010-1666
To remediate this vulnerability, upgrade all affected Python cjson 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 python-cjson>=1.0.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show python-cjson
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2010-1666, inspect your installed packages using pip:
pip show python-cjson
Analyze the terminal output to locate any version of Python cjson in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.5.1), your application is affected.
Note: The pip show python-cjson command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Python cjson, 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-2010-1666 Affected Python cjson Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
python-cjson
|
PyPI |
< 1.0.5.1
|
1.0.5.1
|
References
Frequently Asked Questions
What is CVE-2010-1666?
Which Python cjson versions are affected?
What version fixes CVE-2010-1666?
Is python-cjson affected?
What CWE is associated with CVE-2010-1666?
How can I check PyPI dependencies for CVE-2010-1666?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cqmh-mpx2-g633",
"modified" : "2024-10-15T16:54:45Z",
"published" : "2022-05-17T05:49:38Z",
"aliases" : [ "CVE-2010-1666" ],
"summary" : "Improper Restriction of Operations within the Bounds of a Memory Buffer in python-cjson",
"details" : "Buffer overflow in Dan Pascu python-cjson 1.0.5, when UCS-4 encoding is enabled, allows context-dependent attackers to cause a denial of service (application crash) or possibly have unspecified other impact via vectors involving crafted Unicode input to the cjson.encode function.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "python-cjson"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.5.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.5"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2010-1666"
}, {
"type" : "WEB",
"url" : "https://github.com/AGProjects/python-cjson/commit/dc2b8781b8666de5ca707318521f554904fdd690"
}, {
"type" : "WEB",
"url" : "https://bugs.launchpad.net/ubuntu/+source/python-cjson/+bug/585274"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/AGProjects/python-cjson"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/python-cjson/PYSEC-2010-30.yaml"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2010/dsa-2068"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-08T18:56:28Z",
"nvd_published_at" : "2010-07-02T19:00:00Z"
}
}