CVE-2024-36124
📋 TL;DR
CVE-2024-36124 is an out-of-bounds read vulnerability in the iq80 Snappy compression library that occurs during decompression of certain data. This can lead to non-deterministic behavior or JVM crashes due to unsafe memory access via sun.misc.Unsafe. Any Java applications using vulnerable versions of the iq80 Snappy library are affected.
💻 Affected Systems
- iq80 Snappy Java library
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
JVM crash leading to denial of service, potential information disclosure through memory reads, or remote code execution if combined with other vulnerabilities.
Likely Case
Application instability, crashes, or denial of service when processing malicious compressed data.
If Mitigated
Limited impact if proper input validation and sandboxing are in place, but still risk of crashes.
🎯 Exploit Status
Exploitation requires sending specially crafted compressed data to applications using the vulnerable library.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.5
Vendor Advisory: https://github.com/dain/snappy/security/advisories/GHSA-8wh2-6qhj-h7j9
Restart Required: Yes
Instructions:
1. Identify applications using iq80 Snappy. 2. Update dependency to version 0.5 or later. 3. Rebuild and redeploy applications. 4. Restart affected services.
🔧 Temporary Workarounds
Disable Snappy compression
allDisable Snappy compression in application configuration if not required
Application-specific configuration changes required
Input validation
allImplement strict input validation for compressed data before passing to Snappy
Implement custom validation logic in application code
🧯 If You Can't Patch
- Implement network segmentation to isolate vulnerable systems
- Deploy WAF rules to block suspicious compressed data patterns
🔍 How to Verify
Check if Vulnerable:
Check application dependencies for iq80 Snappy versions below 0.5 using dependency management tools or examining pom.xml/gradle files.
Check Version:
For Maven: mvn dependency:tree | grep snappy; For Gradle: gradle dependencies | grep snappy
Verify Fix Applied:
Verify that iq80 Snappy dependency is version 0.5 or higher in dependency files and that applications restart successfully.
📡 Detection & Monitoring
Log Indicators:
- JVM crash logs
- OutOfMemoryError exceptions
- Stack traces containing snappy decompression methods
Network Indicators:
- Unusual compressed data patterns to application endpoints
SIEM Query:
source="application.logs" AND ("OutOfMemoryError" OR "JVM crash" OR "snappy")