Moderate severityNVD Advisory· Published Sep 15, 2012· Updated Apr 29, 2026
CVE-2012-3458
CVE-2012-3458
Description
Beaker before 1.6.4, when using PyCrypto to encrypt sessions, uses AES in ECB cipher mode, which might allow remote attackers to obtain portions of sensitive session data via unspecified vectors.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
beakerPyPI | < 1.6.4 | 1.6.4 |
Affected products
1Patches
191becae76101Apply patch from Redhat to secure pycrypto that otherwise could allow an attacker to determine contents of the encrypted payload (but is unable to modify).
1 file changed · +6 −5
beaker/crypto/pycrypto.py+6 −5 modified@@ -15,17 +15,18 @@ def aesEncrypt(data, key): except ImportError: from Crypto.Cipher import AES + from Crypto.Util import Counter def aesEncrypt(data, key): - cipher = AES.new(key) + cipher = AES.new(key, AES.MODE_CTR, + counter=Counter.new(128, initial_value=0)) - data = data + (" " * (16 - (len(data) % 16))) return cipher.encrypt(data) def aesDecrypt(data, key): - cipher = AES.new(key) - - return cipher.decrypt(data).rstrip() + cipher = AES.new(key, AES.MODE_CTR, + counter=Counter.new(128, initial_value=0)) + return cipher.decrypt(data) def getKeyLength(): return 32
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
11- secunia.com/advisories/50226nvdVendor Advisory
- secunia.com/advisories/50520nvdVendor Advisory
- github.com/advisories/GHSA-39vm-p9mr-4r27ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2012-3458ghsaADVISORY
- www.debian.org/security/2012/dsa-2541nvdWEB
- www.openwall.com/lists/oss-security/2012/08/13/10nvdWEB
- bugzilla.redhat.com/show_bug.cginvdWEB
- github.com/bbangert/beaker/commit/91becae76101cf87ce8cbfabe3af2622fc328fe5nvdWEB
- github.com/pypa/advisory-database/tree/main/vulns/beaker/PYSEC-2012-1.yamlghsaWEB
- web.archive.org/web/20140724164516/http://secunia.com/advisories/50226ghsaWEB
- web.archive.org/web/20140725025612/http://secunia.com/advisories/50520ghsaWEB
News mentions
0No linked articles in our index yet.