CVE-2017-7252

7.5 HIGH

📋 TL;DR

This vulnerability in Botan's bcrypt implementation incorrectly handles passwords between 57-72 characters, allowing attackers to more easily crack hashed passwords. It affects any system using Botan library versions before 2.1.0 for password hashing. The flaw reduces the security of password storage mechanisms.

💻 Affected Systems

Products:
  • Botan cryptography library
Versions: All versions before 2.1.0
Operating Systems: All platforms running affected Botan versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects bcrypt password hashing functionality. Applications must be using Botan's bcrypt implementation with passwords 57-72 characters long.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could recover plaintext passwords from bcrypt hashes, leading to complete account compromise and potential lateral movement within systems.

🟠

Likely Case

Targeted password cracking attacks against specific accounts where attackers have obtained password hashes through other means.

🟢

If Mitigated

With proper password policies (length limits) and hash rotation, impact is limited to historical password data.

🌐 Internet-Facing: MEDIUM - Only affects systems where password hashes are exposed or can be obtained through other vulnerabilities.
🏢 Internal Only: MEDIUM - Similar risk profile as internet-facing, dependent on hash exposure through other attack vectors.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires access to password hashes. Attack involves offline password cracking with reduced computational complexity for affected password lengths.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.1.0 and later

Vendor Advisory: https://botan.randombit.net/security.html

Restart Required: Yes

Instructions:

1. Update Botan library to version 2.1.0 or later. 2. Recompile applications using Botan. 3. Restart affected services. 4. Consider re-hashing passwords with updated library.

🔧 Temporary Workarounds

Password length restriction

all

Enforce password policies limiting passwords to 56 characters or less to avoid the vulnerable range

Use alternative hashing algorithm

all

Temporarily switch to SHA-256 or other secure hashing algorithms until Botan can be updated

🧯 If You Can't Patch

  • Implement password length restrictions (max 56 characters) in all authentication systems
  • Force password resets for all users and re-hash with workaround algorithm

🔍 How to Verify

Check if Vulnerable:

Check Botan version with: botan version or examine library files. Versions <2.1.0 are vulnerable.

Check Version:

botan version or check library version in package manager

Verify Fix Applied:

Verify Botan version is >=2.1.0 and test bcrypt hashing with 57-72 character passwords returns correct hashes.

📡 Detection & Monitoring

Log Indicators:

  • Unusual authentication failures for specific accounts
  • Multiple password reset requests

Network Indicators:

  • Large volumes of authentication attempts against specific accounts

SIEM Query:

Authentication failures where username contains passwords 57-72 chars OR multiple failed logins for same account in short period

🔗 References

📤 Share & Export