# CVE-2012-4571: Python Keyring does not securely initialize encryption cipher

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 2.1
- **CVSS:** 2.1 (v2.0, NVD) `AV:L/AC:L/Au:N/C:P/I:N/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Authentication: None; Confidentiality impact: Partial; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.37% (percentile 23, 2026-11-26)
- **CWE:** CWE-310
- **Aliases:** GHSA-p3h7-3c45-qj4v, PYSEC-2012-8
- **Published:** 2012-11-30T22:00:00.000Z
- **Modified:** 2026-06-16T23:45:25.253Z

## Who should check

- Projects that depend on PyPI package keyring (\< 0.9.2)
- Anyone running n/a (versions: see the vendor advisory)

## Description

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.

## Affected and fixed versions

- PyPI `keyring`: affected \< 0.9.2; fixed 0.9.2 (osv)
- n/a: see vendor advisory (nvd)

## Mitigation

- Upgrade keyring to 0.9.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2012-4571. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2012-4571.md
Affected: keyring < 0.9.2
Fixed in: 0.9.2

Steps:
1. Search this machine and project for keyring (PyPI), n/a: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2012-4571 being exploited?

There is no confirmed exploitation: CVE-2012-4571 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.37% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2012-4571?

Low: CVSS 2.1 (v2.0, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2012-4571?

keyring \< 0.9.2.

### Is there a fix for CVE-2012-4571?

Yes. Fixed in 0.9.2. Upgrade keyring to 0.9.2 or later.

### How do I check if I'm affected by CVE-2012-4571?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <http://www.ubuntu.com/usn/USN-1634-1>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2012-4571>
- vendor: <https://github.com/advisories/GHSA-p3h7-3c45-qj4v>
- patch: <https://github.com/jaraco/keyring/commit/162f2ed0e39e16d561732b9fad8af6cd2341d7bd>
- patch: <https://github.com/jaraco/keyring/commit/56272d908ba7a3fe4ebb6d6e87a7cc569f4726ac>
- patch: <https://github.com/jaraco/keyring/commit/a76942672f6ac85a88bd9b9ed31fd133119b7702>
- patch: <https://github.com/jaraco/keyring/commit/cbf509b0386c3063d8b2879ce72d78ac18023f72>
- patch: <https://github.com/jaraco/keyring/commit/cc1ead78d1e3fab9fa8bb0b4bb334cb82d35db52>
- other: <http://pypi.python.org/pypi/keyring>
- other: <https://bugs.launchpad.net/ubuntu/+source/python-keyring/+bug/1004845>
- other: <http://www.openwall.com/lists/oss-security/2012/10/31/8>
- other: <https://github.com/jaraco/keyring>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/keyring/PYSEC-2012-8.yaml>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2012-4571>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-p3h7-3c45-qj4v> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2012-8> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2012-4571> · JSON: <https://flawdb.com/api/v1/entries/CVE-2012-4571>
