CVE-2021-3858

8.8 HIGH

📋 TL;DR

CVE-2021-3858 is a Cross-Site Request Forgery (CSRF) vulnerability in Snipe-IT that allows attackers to trick authenticated users into performing unintended actions. This affects all Snipe-IT users with authenticated sessions, potentially leading to unauthorized modifications of asset data.

💻 Affected Systems

Products:
  • Snipe-IT
Versions: All versions before commit 84c73aae5dcafa9529ceeeda6e8cdda5a42129c3
Operating Systems: All platforms running Snipe-IT
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations of affected Snipe-IT versions are vulnerable. The vulnerability exists in the web application layer.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could manipulate asset data, delete records, or modify user permissions through forged requests executed by authenticated administrators.

🟠

Likely Case

Unauthorized modification of asset information, creation of fake assets, or alteration of existing asset details by exploiting authenticated user sessions.

🟢

If Mitigated

With proper CSRF protections, requests would be rejected unless they include valid anti-CSRF tokens, preventing unauthorized actions.

🌐 Internet-Facing: HIGH - Web applications exposed to the internet are primary targets for CSRF attacks as attackers can host malicious sites.
🏢 Internal Only: MEDIUM - Internal users could still be targeted through phishing or compromised internal systems, though attack surface is reduced.

🎯 Exploit Status

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

CSRF attacks are well-understood and easy to implement. The vulnerability requires the victim to be authenticated to Snipe-IT and visit a malicious page.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit 84c73aae5dcafa9529ceeeda6e8cdda5a42129c3 and later

Vendor Advisory: https://github.com/snipe/snipe-it/commit/84c73aae5dcafa9529ceeeda6e8cdda5a42129c3

Restart Required: No

Instructions:

1. Update Snipe-IT to the latest version or apply commit 84c73aae5dcafa9529ceeeda6e8cdda5a42129c3. 2. Verify CSRF tokens are properly implemented in all forms. 3. Clear browser caches if experiencing issues.

🔧 Temporary Workarounds

Implement CSRF Protection Middleware

all

Add CSRF token validation to all state-changing requests

# This requires code modification. Add CSRF token validation in your Snipe-IT middleware configuration.

Use SameSite Cookies

all

Configure session cookies with SameSite=Strict attribute to prevent CSRF

# In your web server or application configuration, set: session.cookie_samesite = Strict

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to detect and block CSRF patterns
  • Require re-authentication for sensitive actions and implement additional confirmation steps

🔍 How to Verify

Check if Vulnerable:

Check if your Snipe-IT version is older than commit 84c73aae5dcafa9529ceeeda6e8cdda5a42129c3. Review forms for missing CSRF tokens.

Check Version:

Check Snipe-IT version in admin panel or run: php artisan --version (for Laravel-based installations)

Verify Fix Applied:

Verify that all forms include CSRF tokens and that POST requests without valid tokens are rejected. Test with CSRF testing tools.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed POST requests missing CSRF tokens
  • Unexpected asset modifications from unusual IP addresses

Network Indicators:

  • POST requests to Snipe-IT endpoints without Referer headers or with external origins

SIEM Query:

web_requests method=POST AND (NOT csrf_token=*) AND uri_path CONTAINS '/snipe-it/'

🔗 References

📤 Share & Export