CVE-2012-4571: Keyring Python Keyring Does Not Securely Vulnerability

HIGH
Advisory Identifier: GHSA-p3h7-3c45-qj4v
CVSS 7.5
CWE-326
Published
Advisory Summary

CVE-2012-4571 is a HIGH (CVSS 7.5) python keyring does not securely vulnerability (CWE-326: Inadequate Encryption Strength) affecting Keyring libraries in the PyPI ecosystem. The issue involves python keyring does not securely initialize encryption cipher. Remediation is available by upgrading affected packages to version 0.9.2.

CVE-2012-4571 at a Glance

CVE Identifier CVE-2012-4571
GHSA Identifier GHSA-p3h7-3c45-qj4v
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-326: Inadequate Encryption Strength
Affected Product Keyring
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2012-4571

To remediate this vulnerability, upgrade all affected Keyring dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

keyring fixed: 0.9.2
pip install keyring>=0.9.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show keyring

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2012-4571, inspect your installed packages using pip:

pip show keyring

Analyze the terminal output to locate any version of Keyring in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.2), your application is affected.

Note: The pip show keyring command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-326: Inadequate Encryption Strength, where the product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required. In Keyring, 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

Python Keyring 0.9.1 does not securely initialize the cipher when encrypting passwords for `CryptedFileKeyring` files, which makes it easier for local users to obtain passwords via a brute-force attack.

CVE-2012-4571 Affected Keyring Versions

1 component(s)
Fixed Versions:
0.9.2
Product / Package Ecosystem Affected Versions Fixed Version
keyring
PyPI
< 0.9.2
0.9.2

References

Frequently Asked Questions

What is CVE-2012-4571?
CVE-2012-4571 is a security vulnerability in Keyring involving Python Keyring does not securely initialize encryption cipher under CWE-326: Inadequate Encryption Strength.
Which Keyring versions are affected?
Affected versions include releases prior to 0.9.2 across affected packages: keyring.
What version fixes CVE-2012-4571?
Upgrading to 0.9.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is keyring affected?
Yes, keyring is affected in releases prior to 0.9.2. Upgrade your dependency to 0.9.2 or later.
What is the CVSS score of CVE-2012-4571?
CVE-2012-4571 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2012-4571?
CVE-2012-4571 is classified under CWE-326: Inadequate Encryption Strength (The product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.).
How can I check PyPI dependencies for CVE-2012-4571?
Run the dependency tree command: 'pip show keyring'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p3h7-3c45-qj4v",
  "modified" : "2024-09-27T17:28:09Z",
  "published" : "2022-05-17T05:18:21Z",
  "aliases" : [ "CVE-2012-4571" ],
  "summary" : "Python Keyring does not securely initialize encryption cipher",
  "details" : "Python Keyring 0.9.1 does not securely initialize the cipher when encrypting passwords for `CryptedFileKeyring` files, which makes it easier for local users to obtain passwords via a brute-force attack.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:H/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keyring"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.9.1"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-4571"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jaraco/keyring/commit/162f2ed0e39e16d561732b9fad8af6cd2341d7bd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jaraco/keyring/commit/56272d908ba7a3fe4ebb6d6e87a7cc569f4726ac"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jaraco/keyring/commit/a76942672f6ac85a88bd9b9ed31fd133119b7702"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jaraco/keyring/commit/cbf509b0386c3063d8b2879ce72d78ac18023f72"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jaraco/keyring/commit/cc1ead78d1e3fab9fa8bb0b4bb334cb82d35db52"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/ubuntu/+source/python-keyring/+bug/1004845"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jaraco/keyring"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/keyring/PYSEC-2012-8.yaml"
  }, {
    "type" : "WEB",
    "url" : "http://pypi.python.org/pypi/keyring"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2012/10/31/8"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-1634-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-326" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-29T21:40:04Z",
    "nvd_published_at" : "2012-11-30T22:55:00Z"
  }
}