CVE-2024-22871
📋 TL;DR
A vulnerability in Clojure versions 1.20 through 1.12.0-alpha5 allows attackers to cause denial of service (DoS) by exploiting the clojure.core$partial$fn__5920 function. This affects applications using vulnerable Clojure libraries or frameworks. The issue stems from deserialization of untrusted data leading to resource exhaustion.
💻 Affected Systems
- Clojure programming language
📦 What is this software?
Clojure by Clojure
Clojure by Clojure
Clojure by Clojure
Clojure by Clojure
Clojure by Clojure
Clojure by Clojure
Clojure by Clojure
Clojure by Clojure
Clojure by Clojure
Fedora by Fedoraproject
Fedora by Fedoraproject
Fedora by Fedoraproject
⚠️ Risk & Real-World Impact
Worst Case
Complete service unavailability due to resource exhaustion, potentially affecting dependent systems.
Likely Case
Degraded performance or temporary service disruption from targeted DoS attacks.
If Mitigated
Minimal impact with proper input validation and resource limits in place.
🎯 Exploit Status
Exploitation requires sending malicious data to vulnerable applications.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.12.0-alpha6 and later
Vendor Advisory: https://clojure.org/security
Restart Required: Yes
Instructions:
1. Update Clojure to version 1.12.0-alpha6 or later. 2. Update project dependencies. 3. Restart affected applications.
🔧 Temporary Workarounds
Input validation
allValidate and sanitize all input before processing with Clojure functions.
Resource limits
linuxImplement resource limits on Clojure application processes.
ulimit -v 1048576
systemctl set-property service MemoryMax=1G
🧯 If You Can't Patch
- Isolate vulnerable systems from untrusted networks
- Implement strict input validation and monitoring
🔍 How to Verify
Check if Vulnerable:
Check Clojure version in project dependencies or runtime.
Check Version:
clojure -M -e "(println (clojure-version))"
Verify Fix Applied:
Confirm Clojure version is 1.12.0-alpha6 or later.
📡 Detection & Monitoring
Log Indicators:
- Unusual memory or CPU spikes
- Application crashes related to clojure.core functions
Network Indicators:
- High volume of requests to Clojure endpoints
- Unusual payload patterns
SIEM Query:
source="application.logs" AND ("clojure.core$partial" OR "OutOfMemoryError")
🔗 References
- https://hackmd.io/%40fe1w0/rymmJGida
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/25FKUOYXQZGGJMFUM5HJABWMIX2TILRV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SWWK2SO2MH4SXPO6L444MM6LHVLVFULV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YFPGUDXMW6OXKIDGCOZFEAXO74VQIB2T/
- https://hackmd.io/%40fe1w0/rymmJGida
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/25FKUOYXQZGGJMFUM5HJABWMIX2TILRV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SWWK2SO2MH4SXPO6L444MM6LHVLVFULV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YFPGUDXMW6OXKIDGCOZFEAXO74VQIB2T/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/25FKUOYXQZGGJMFUM5HJABWMIX2TILRV/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SWWK2SO2MH4SXPO6L444MM6LHVLVFULV/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFPGUDXMW6OXKIDGCOZFEAXO74VQIB2T/