CVE-2024-34075
📋 TL;DR
CVE-2024-34075 is a deserialization vulnerability in the kurwov Markov chain library where malicious strings containing '__proto__ ' (with trailing space) bypass sanitization, causing denial of service by crashing the generation functions. This affects any application using kurwov for text generation with untrusted input.
💻 Affected Systems
- kurwov Markov chain library
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Complete denial of service for Markov chain generation functionality, potentially disrupting text generation services or applications relying on kurwov.
Likely Case
Service disruption where contaminated datasets cause Markov chain generation to fail, requiring dataset cleanup or service restart.
If Mitigated
Minimal impact if using only trusted datasets or if input validation prevents malicious strings from reaching the library.
🎯 Exploit Status
Exploitation requires injecting specific strings into datasets, but no authentication is needed if input is accepted.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.2.5
Vendor Advisory: https://github.com/xiboon/kurwov/security/advisories/GHSA-hfrv-h3q8-9jpr
Restart Required: No
Instructions:
1. Update kurwov dependency to version 3.2.5 or later. 2. Run 'npm update kurwov' or 'yarn upgrade kurwov'. 3. Verify the update in package.json shows version >=3.2.5.
🔧 Temporary Workarounds
Input sanitization
allImplement pre-processing to remove or escape strings containing '__proto__ ' (with trailing space) before passing to kurwov.
// JavaScript example: dataset = dataset.filter(str => !str.includes('__proto__ '))
🧯 If You Can't Patch
- Implement strict input validation to reject datasets containing '__proto__ ' strings.
- Monitor application logs for Markov chain generation failures and implement circuit breakers.
🔍 How to Verify
Check if Vulnerable:
Check package.json or node_modules/kurwov/package.json for version number below 3.2.5.
Check Version:
npm list kurwov | grep kurwov
Verify Fix Applied:
Test with a dataset containing '__proto__ ' string - generation should complete without errors in version 3.2.5+.
📡 Detection & Monitoring
Log Indicators:
- Error logs from Markov chain generation functions
- Application crashes during text generation
Network Indicators:
- Increased error responses from text generation endpoints
SIEM Query:
source="application.logs" AND ("Markov" OR "kurwov") AND ("error" OR "crash" OR "failed")
🔗 References
- https://github.com/xiboon/kurwov/blob/0d58dfa42135ab40e830e92622857282f980ca89/src/MarkovData.ts#L38-L44
- https://github.com/xiboon/kurwov/commit/85d63e652594f121d6656177d7a3c0d823c976c9
- https://github.com/xiboon/kurwov/security/advisories/GHSA-hfrv-h3q8-9jpr
- https://github.com/xiboon/kurwov/blob/0d58dfa42135ab40e830e92622857282f980ca89/src/MarkovData.ts#L38-L44
- https://github.com/xiboon/kurwov/commit/85d63e652594f121d6656177d7a3c0d823c976c9
- https://github.com/xiboon/kurwov/security/advisories/GHSA-hfrv-h3q8-9jpr