CVE-2012-4406: Swift OpenStack Object Storage (swift) Code Vulnerability
CRITICALCVE-2012-4406 is a CRITICAL (CVSS 9.8) openstack object storage (swift) code vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Swift libraries in the PyPI ecosystem. The issue involves openstack object storage (swift) code injection vulnerability. Remediation is available by upgrading affected packages to version 1.7.0.
CVE-2012-4406 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2012-4406
To remediate this vulnerability, upgrade all affected Swift 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 swift>=1.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show swift
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2012-4406, inspect your installed packages using pip:
pip show swift
Analyze the terminal output to locate any version of Swift in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.0), your application is affected.
Note: The pip show swift command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Swift, 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-2012-4406 Affected Swift Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
swift
|
PyPI |
< 1.7.0
|
1.7.0
|
References
Frequently Asked Questions
What is CVE-2012-4406?
Which Swift versions are affected?
What version fixes CVE-2012-4406?
Is swift affected?
What is the CVSS score of CVE-2012-4406?
What CWE is associated with CVE-2012-4406?
How can I check PyPI dependencies for CVE-2012-4406?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v7mh-3jgf-r26c",
"modified" : "2024-02-06T16:02:43Z",
"published" : "2022-05-17T01:42:16Z",
"aliases" : [ "CVE-2012-4406" ],
"summary" : "OpenStack Object Storage (swift) Code Injection vulnerability",
"details" : "OpenStack Object Storage (swift) before 1.7.0 uses the loads function in the pickle Python module unsafely when storing and loading metadata in memcached, which allows remote attackers to execute arbitrary code via a crafted pickle object.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "swift"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-4406"
}, {
"type" : "WEB",
"url" : "https://github.com/openstack/swift/commit/e1ff51c04554d51616d2845f92ab726cb0e5831a"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2012:1379"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2013:0691"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2012-4406"
}, {
"type" : "WEB",
"url" : "https://bugs.launchpad.net/swift/+bug/1006414"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=854757"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/79140"
}, {
"type" : "WEB",
"url" : "https://launchpad.net/swift/+milestone/1.7.0"
}, {
"type" : "PACKAGE",
"url" : "https://opendev.org/openstack/swift"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20130629092623/http://www.securityfocus.com/bid/55420"
}, {
"type" : "WEB",
"url" : "http://lists.fedoraproject.org/pipermail/package-announce/2012-October/089472.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2012-1379.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0691.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2012/09/05/16"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2012/09/05/4"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/55420"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502", "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-08T17:56:11Z",
"nvd_published_at" : "2012-10-22T23:55:00Z"
}
}