CVE-2021-20211
📋 TL;DR
A memory leak vulnerability in Privoxy versions before 3.0.29 when client tags are active can cause the application to crash, leading to denial of service. This affects systems running vulnerable Privoxy configurations with client tagging enabled. Organizations using Privoxy as a web proxy with client tags are at risk.
💻 Affected Systems
- Privoxy
📦 What is this software?
Privoxy by Privoxy
⚠️ Risk & Real-World Impact
Worst Case
Privoxy process crashes repeatedly, causing complete loss of proxy functionality and disrupting all web traffic through the proxy server.
Likely Case
Gradual memory exhaustion leads to Privoxy crashes, causing intermittent proxy service disruptions until restarted.
If Mitigated
With client tags disabled or memory limits in place, the vulnerability cannot be triggered and normal operation continues.
🎯 Exploit Status
Exploitation requires sending traffic through a vulnerable Privoxy instance with client tags enabled. No authentication needed to trigger the memory leak.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.0.29 and later
Vendor Advisory: https://www.privoxy.org/3.0.29/user-manual/whatsnew.html
Restart Required: Yes
Instructions:
1. Download Privoxy 3.0.29 or later from privoxy.org. 2. Stop the current Privoxy service. 3. Install the updated version. 4. Restart the Privoxy service. 5. Verify the new version is running.
🔧 Temporary Workarounds
Disable Client Tags
allRemove or comment out client tag configurations to prevent triggering the memory leak
# Edit privoxy config file
# Comment out or remove lines containing: client-header-tagger
# Restart privoxy: systemctl restart privoxy
Memory Limit Configuration
linuxConfigure system memory limits for the Privoxy process to prevent complete system exhaustion
# Set memory limits via systemd:
# In /etc/systemd/system/privoxy.service.d/memory.conf:
# [Service]
# MemoryMax=512M
# systemctl daemon-reload
# systemctl restart privoxy
🧯 If You Can't Patch
- Disable client tags in Privoxy configuration immediately
- Implement monitoring for Privoxy memory usage and restart automatically if thresholds exceeded
🔍 How to Verify
Check if Vulnerable:
Check Privoxy version and configuration: 'privoxy --version' and examine config for client-header-tagger directives
Check Version:
privoxy --version
Verify Fix Applied:
Confirm version is 3.0.29 or later: 'privoxy --version | grep -q "3.0.29\|3.0.3[0-9]\|3.[1-9]"'
📡 Detection & Monitoring
Log Indicators:
- Privoxy crash logs
- Memory allocation failure messages
- Frequent restarts in system logs
Network Indicators:
- Sudden loss of proxy connectivity
- HTTP 502/503 errors from proxy
SIEM Query:
source="privoxy.log" ("crash" OR "segmentation fault" OR "memory" OR "restart")
🔗 References
- https://bugzilla.redhat.com/show_bug.cgi?id=1928733
- https://security.gentoo.org/glsa/202107-16
- https://www.privoxy.org/3.0.29/user-manual/whatsnew.html
- https://bugzilla.redhat.com/show_bug.cgi?id=1928733
- https://security.gentoo.org/glsa/202107-16
- https://www.privoxy.org/3.0.29/user-manual/whatsnew.html