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

python-keyring Updated 02 Oct 2025

Summary

30/11/2012
N/A
Yes i
Unrated
Not published

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 python-keyring versions < 0.9.2-1. Fixed in 0.9.2-1. How to fix ↓

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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Python Keyring is a library that provides a way to access the system's keyring service to store and retrieve credentials securely. It allows developers to manage passwords and other sensitive information without hardcoding them into applications. The library is widely used in various applications to enhance security by leveraging the underlying operating system's capabilities. However, version 0.9.1 of Python Keyring has a significant vulnerability that compromises its ability to securely encrypt passwords, making it susceptible to brute-force attacks.

Vulnerability Detail

CVE-2012-4571 arises from the insecure initialization of the cipher used for encrypting passwords in CryptedFileKeyring files. This flaw allows local users to exploit the weak encryption mechanism, potentially leading to unauthorized access to sensitive credentials. The vulnerability is rooted in the way the cipher is set up, which does not adequately protect against brute-force attacks, thereby increasing the risk of password exposure.

How To Fix

Minimum fixed version

0.9.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-keyring

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

Workaround

If upgrading is not immediately possible, consider using an alternative method for storing sensitive information, such as environment variables or a different secure storage solution. Additionally, limit access to the system to trusted users only to mitigate the risk of exploitation.

Conclusion

CVE-2012-4571 highlights a critical vulnerability in Python Keyring 0.9.1 that compromises the security of password storage. Upgrading to version 0.9.2-1 or later is essential to protect sensitive information from potential brute-force attacks. Users should also consider alternative storage solutions and limit system access to mitigate risks.

See every vulnerability recorded for python-keyring →

Share this vulnerability

FAQ

CVE-2012-4571 is a vulnerability in Python Keyring 0.9.1 that allows local users to exploit weak encryption methods for password storage, making it easier to obtain sensitive information.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The primary risk is unauthorized access to sensitive credentials stored using the affected version of Python Keyring, which could lead to data breaches or other security incidents.

Yes, you can limit access to the system to trusted users and consider using alternative secure storage methods for sensitive information until an upgrade is possible.

After upgrading, ensure that all stored credentials are re-encrypted using the new version to benefit from the improved security measures.

Related vulnerabilities

Recent vulnerabilities recorded for python-keyring.

How To Fix

Minimum fixed version

0.9.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-keyring

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