CVE-2023-36660
📋 TL;DR
CVE-2023-36660 is a memory corruption vulnerability in the OCB (Offset Codebook) mode implementation in libnettle cryptographic library versions 3.9. It allows attackers to execute arbitrary code or cause denial of service. Systems using Nettle for cryptographic operations with OCB mode are affected.
💻 Affected Systems
- Nettle cryptographic library
- Applications linking against libnettle
📦 What is this software?
Nettle by Nettle Project
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or ransomware deployment.
Likely Case
Application crashes and denial of service affecting cryptographic functionality.
If Mitigated
Limited impact if OCB mode is disabled or unused in configurations.
🎯 Exploit Status
Exploitation requires triggering the OCB functionality with malicious input.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Nettle 3.9.1 or later
Vendor Advisory: https://git.lysator.liu.se/nettle/nettle/-/commit/867a4548b95705291a3afdd66d76e7f17ba2618f
Restart Required: Yes
Instructions:
1. Update Nettle to version 3.9.1 or later using your distribution's package manager. 2. For source installations: download from https://www.lysator.liu.se/~nisse/nettle/ and compile. 3. Restart affected services or applications using Nettle.
🔧 Temporary Workarounds
Disable OCB mode
allConfigure applications to avoid using OCB encryption mode
Application-specific configuration required
🧯 If You Can't Patch
- Disable OCB mode in all applications using Nettle
- Implement network segmentation to limit access to affected systems
🔍 How to Verify
Check if Vulnerable:
Check Nettle version: 'nettle-hash --version' or 'dpkg -l libnettle*' on Debian/Ubuntu, 'rpm -q nettle' on RHEL
Check Version:
nettle-hash --version 2>/dev/null | head -1
Verify Fix Applied:
Confirm version is 3.9.1 or later using version check commands
📡 Detection & Monitoring
Log Indicators:
- Application crashes related to cryptographic operations
- Memory corruption errors in system logs
Network Indicators:
- Unusual cryptographic protocol usage patterns
SIEM Query:
Process monitoring for applications using libnettle with unexpected termination codes
🔗 References
- https://bugzilla.suse.com/show_bug.cgi?id=1212112
- https://git.lysator.liu.se/nettle/nettle/-/commit/867a4548b95705291a3afdd66d76e7f17ba2618f
- https://git.lysator.liu.se/nettle/nettle/-/compare/nettle_3.9_release_20230514...nettle_3.9.1_release_20230601
- https://security.gentoo.org/glsa/202401-24
- https://bugzilla.suse.com/show_bug.cgi?id=1212112
- https://git.lysator.liu.se/nettle/nettle/-/commit/867a4548b95705291a3afdd66d76e7f17ba2618f
- https://git.lysator.liu.se/nettle/nettle/-/compare/nettle_3.9_release_20230514...nettle_3.9.1_release_20230601
- https://security.gentoo.org/glsa/202401-24