CVE-2012-4571: Python Keyring 0.9.1 Insecure Cipher Initialization

keyring Updated 02 Oct 2025

Summary

30/11/2012
Yes i
High
7.5

CVE-2012-4571: 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. Affects keyring versions < 0.9.2. Fixed in 0.9.2. How to fix ↓

Also tracked for

The same CVE-2012-4571 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Python Keyring is a package that provides a way to store and retrieve passwords securely. It offers a unified API for accessing passwords from different keyring backends. The CryptedFileKeyring is one such backend that allows users to encrypt passwords and store them in a file. However, in version 0.9.1, the cipher used for encryption is not securely initialized, making it easier for local users to obtain passwords through brute-force attacks.

Vulnerability Detail

The vulnerability in Python Keyring 0.9.1 lies in the insecure initialization of the cipher when encrypting passwords for CryptedFileKeyring files. This flaw allows local users to potentially retrieve passwords by performing brute-force attacks. By exploiting this vulnerability, an attacker with local access to the system could gain unauthorized access to sensitive information, compromising the security of the affected system.

How To Fix

Latest published version: 25.7.0 as of 22 Oct 2026

pip install --upgrade "keyring==25.7.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.9.2

This is the first release that contains the fix.

pip install --upgrade "keyring==0.9.2"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to upgrade to the fixed version of Python Keyring as soon as possible.

Conclusion

The vulnerability in Python Keyring 0.9.1 allows local users to potentially retrieve passwords through brute-force attacks. It is crucial to upgrade to version 0.9.2 or later to address this issue and ensure the secure encryption of passwords. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for keyring →

Share this vulnerability

FAQ

Python Keyring is a package that provides a secure way to store and retrieve passwords.

This vulnerability allows local users to potentially obtain passwords through brute-force attacks, compromising the security of the affected system.

To fix this vulnerability, upgrade to Python Keyring version 0.9.2 or later.

There is no known workaround. It is recommended to upgrade to the fixed version of Python Keyring.

For more information, you can refer to the official Python Keyring advisory: [link to advisory]

Related vulnerabilities

Recent vulnerabilities recorded for keyring.

How To Fix

Latest published version: 25.7.0 as of 22 Oct 2026

pip install --upgrade "keyring==25.7.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.9.2

This is the first release that contains the fix.

pip install --upgrade "keyring==0.9.2"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback