CVE-2021-28490

8.8 HIGH

📋 TL;DR

This vulnerability in OWASP CSRFGuard allows attackers to bypass Cross-Site Request Forgery (CSRF) protection by retrieving the CSRF cookie using only a session token. This affects all applications using OWASP CSRFGuard versions through 3.1.0 for CSRF protection.

💻 Affected Systems

Products:
  • OWASP CSRFGuard
Versions: through 3.1.0
Operating Systems: all
Default Config Vulnerable: ⚠️ Yes
Notes: All applications using CSRFGuard with default or custom configurations are affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers can perform unauthorized actions on behalf of authenticated users, potentially leading to account takeover, data theft, or administrative actions.

🟠

Likely Case

Attackers can perform CSRF attacks to modify user data, change settings, or perform actions within the user's permissions.

🟢

If Mitigated

With proper controls, impact is limited to applications that rely solely on CSRFGuard without additional security layers.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires the attacker to obtain a valid session token, which can be done through various means like XSS or session fixation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.1.1 or later

Vendor Advisory: https://owasp.org/www-project-csrfguard/

Restart Required: Yes

Instructions:

1. Update OWASP CSRFGuard to version 3.1.1 or later. 2. Replace the CSRFGuard JAR file in your application. 3. Restart the application server.

🔧 Temporary Workarounds

Implement additional CSRF tokens

all

Add custom CSRF tokens in forms alongside CSRFGuard to provide layered protection.

Use SameSite cookie attribute

all

Set the SameSite attribute on session cookies to restrict cross-site requests.

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to detect and block CSRF attempts.
  • Monitor for unusual user actions and implement rate limiting on sensitive endpoints.

🔍 How to Verify

Check if Vulnerable:

Check the CSRFGuard version in your application's dependencies or JAR file metadata.

Check Version:

java -jar csrfguard.jar --version or check Maven/Gradle dependencies.

Verify Fix Applied:

Verify that CSRFGuard version is 3.1.1 or later and test CSRF protection with security tools.

📡 Detection & Monitoring

Log Indicators:

  • Failed CSRF token validations
  • Unusual POST requests without referrer headers

Network Indicators:

  • Cross-origin requests to sensitive endpoints
  • Requests with missing or mismatched CSRF tokens

SIEM Query:

source="app_logs" AND (event="CSRF_FAILURE" OR csrf_token="missing")

🔗 References

📤 Share & Export