CVE-2021-20274

7.5 HIGH

📋 TL;DR

This vulnerability in Privoxy allows a crash due to a NULL-pointer dereference when the SOCKS server behaves unexpectedly. It affects Privoxy versions before 3.0.32. Systems using Privoxy as a proxy with SOCKS configuration are vulnerable to denial of service.

💻 Affected Systems

Products:
  • Privoxy
Versions: All versions before 3.0.32
Operating Systems: Linux, Windows, macOS, BSD
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when configured to use SOCKS proxy functionality. Default installations without SOCKS configuration are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption of Privoxy proxy, causing loss of proxy functionality for all clients.

🟠

Likely Case

Intermittent crashes of Privoxy service requiring manual restart, causing temporary proxy service disruption.

🟢

If Mitigated

No impact if SOCKS server is properly configured and behaves correctly, or if SOCKS is not used.

🌐 Internet-Facing: MEDIUM - Internet-facing Privoxy instances could be targeted to cause denial of service.
🏢 Internal Only: LOW - Internal-only instances have lower attack surface but still vulnerable to misconfigured SOCKS servers.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires ability to interact with SOCKS server configuration or cause SOCKS server misbehavior.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.0.32 and later

Vendor Advisory: https://www.privoxy.org/announce.txt

Restart Required: Yes

Instructions:

1. Download Privoxy 3.0.32 or later from https://www.privoxy.org 2. Stop Privoxy service 3. Install new version 4. Restart Privoxy service

🔧 Temporary Workarounds

Disable SOCKS proxy

all

Remove or comment out SOCKS configuration in Privoxy config file

# Edit /etc/privoxy/config or equivalent
# Comment out or remove 'forward-socks5' lines

Restrict SOCKS server access

linux

Configure firewall to restrict access to SOCKS server only from trusted sources

iptables -A INPUT -p tcp --dport [SOCKS_PORT] -s [TRUSTED_IP] -j ACCEPT
iptables -A INPUT -p tcp --dport [SOCKS_PORT] -j DROP

🧯 If You Can't Patch

  • Disable SOCKS proxy functionality in Privoxy configuration
  • Implement network segmentation to isolate SOCKS server from untrusted networks

🔍 How to Verify

Check if Vulnerable:

Check Privoxy version with 'privoxy --version' and verify it's below 3.0.32

Check Version:

privoxy --version

Verify Fix Applied:

Verify version is 3.0.32 or higher with 'privoxy --version'

📡 Detection & Monitoring

Log Indicators:

  • Privoxy crash logs
  • Segmentation fault errors in system logs
  • Unexpected service restarts

Network Indicators:

  • Sudden drop in proxy connections
  • SOCKS connection failures

SIEM Query:

source="privoxy.log" AND ("segmentation fault" OR "crash" OR "SIGSEGV")

🔗 References

📤 Share & Export