Vulnerabilities in pkg:pypi/keyring

PACKAGE
Advisory Identifier: GHSA-8867-vpm3-g98g
Advisory Summary

CVE-2012-5578 is a HIGH (CVSS 6.2) incorrect default permissions vulnerability (CWE-276: Incorrect Default Permissions) affecting Keyring libraries in the PyPI ecosystem. The issue involves incorrect default permissions in keyring. Remediation is available by upgrading affected packages to version 0.10.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/keyring

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/keyring. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8867-vpm3-g98g CVE-2012-5578 HIGH Incorrect Default Permissions in keyring
GHSA-p86x-652p-6385 CVE-2012-5577 HIGH Incorrect Default Permissions in keyring
GHSA-p3h7-3c45-qj4v CVE-2012-4571 HIGH Python Keyring does not securely initialize encryption cipher

CVE-2012-5578 at a Glance

CVE Identifier CVE-2012-5578
GHSA Identifier GHSA-8867-vpm3-g98g
Severity HIGH
CVSS v3.1 Base Score 6.2
CWE Classification CWE-276: Incorrect Default Permissions
Affected Product Keyring
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Local (AV:L)
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-5578

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.10
pip install keyring>=0.10
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-5578, 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.10), 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-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. 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 has insecure permissions on new databases, allowing world-readable files to be created.

CVE-2012-5578 Affected Keyring Versions

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

References

Frequently Asked Questions

What is CVE-2012-5578?
CVE-2012-5578 is a security vulnerability in Keyring involving Incorrect Default Permissions in keyring under CWE-276: Incorrect Default Permissions.
Which Keyring versions are affected?
Affected versions include releases prior to 0.10 across affected packages: keyring.
What version fixes CVE-2012-5578?
Upgrading to 0.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is keyring affected?
Yes, keyring is affected in releases prior to 0.10. Upgrade your dependency to 0.10 or later.
What is the CVSS score of CVE-2012-5578?
CVE-2012-5578 has a CVSS v3.1 base score of 6.2 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2012-5578?
CVE-2012-5578 is classified under CWE-276: Incorrect Default Permissions (During installation, installed file permissions are set to allow anyone to modify those files.).
How can I check PyPI dependencies for CVE-2012-5578?
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-8867-vpm3-g98g",
  "modified" : "2024-09-27T21:34:28Z",
  "published" : "2020-03-10T20:56:41Z",
  "aliases" : [ "CVE-2012-5578" ],
  "summary" : "Incorrect Default Permissions in keyring",
  "details" : "Python keyring has insecure permissions on new databases, allowing world-readable files to be created.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/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:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keyring"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-5578"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/cve-2012-5578"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/ubuntu/+source/python-keyring/+bug/1031465"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2012-5578"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.suse.com/show_bug.cgi?id=CVE-2012-5578"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-8867-vpm3-g98g"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jaraco/keyring"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jaraco/keyring/blob/master/CHANGES.rst#010"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/keyring/PYSEC-2019-182.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://security-tracker.debian.org/tracker/CVE-2012-5578"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2012/11/27/4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-03-10T20:56:29Z",
    "nvd_published_at" : null
  }
}