CVE-2021-30141
📋 TL;DR
CVE-2021-30141 is an authentication bypass vulnerability in Friendica's user export feature that allows anonymous users to access sensitive functionality. This can lead to excessive memory consumption and potential denial of service. All Friendica instances running versions through 2021.01 are affected.
💻 Affected Systems
- Friendica
📦 What is this software?
Friendica by Friendica
⚠️ Risk & Real-World Impact
Worst Case
Complete system resource exhaustion leading to denial of service, potential exposure of user data if combined with other vulnerabilities.
Likely Case
Denial of service through memory exhaustion, system instability, and potential information disclosure.
If Mitigated
Minimal impact if proper authentication controls are enforced and resource limits are in place.
🎯 Exploit Status
The vulnerability involves accessing a specific endpoint without proper authentication, making exploitation straightforward.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Versions after commit acbcc56754121ba080eac5b6fdf69e64ed7fe453
Vendor Advisory: https://github.com/friendica/friendica/issues/10110
Restart Required: No
Instructions:
1. Update Friendica to version after commit acbcc56754121ba080eac5b6fdf69e64ed7fe453. 2. Apply the patch from the GitHub pull request #10113. 3. Verify the /settings/userexport endpoint now requires proper authentication.
🔧 Temporary Workarounds
Block Anonymous Access to User Export
allConfigure web server to block access to /settings/userexport for unauthenticated users
# For Apache: add to .htaccess
<Location "/settings/userexport">
Require valid-user
</Location>
# For Nginx: add to server block
location /settings/userexport {
auth_basic "Restricted";
auth_basic_user_file /path/to/.htpasswd;
}
🧯 If You Can't Patch
- Implement strict rate limiting on the /settings/userexport endpoint
- Deploy WAF rules to block suspicious access patterns to user export functionality
🔍 How to Verify
Check if Vulnerable:
Attempt to access /settings/userexport without authentication. If accessible, the system is vulnerable.
Check Version:
Check Friendica version in admin panel or via git log for commit history
Verify Fix Applied:
Verify that /settings/userexport now returns authentication error for unauthenticated requests.
📡 Detection & Monitoring
Log Indicators:
- Multiple failed authentication attempts followed by access to /settings/userexport
- Unusual memory consumption spikes
- Anonymous user access to protected endpoints
Network Indicators:
- HTTP requests to /settings/userexport without authentication headers
- Unusual traffic patterns to user export functionality
SIEM Query:
source="web_server" AND (uri="/settings/userexport" AND NOT auth_status="success")
🔗 References
- https://github.com/friendica/friendica/issues/10110
- https://github.com/friendica/friendica/pull/10113/commits/acbcc56754121ba080eac5b6fdf69e64ed7fe453
- https://github.com/friendica/friendica/issues/10110
- https://github.com/friendica/friendica/pull/10113/commits/acbcc56754121ba080eac5b6fdf69e64ed7fe453