CVE-2023-42270

8.8 HIGH

📋 TL;DR

This CVE describes a Cross-Site Request Forgery (CSRF) vulnerability in Grocy versions up to 4.0.2. Attackers can trick authenticated users into performing unintended actions on the Grocy web application without their knowledge. This affects all Grocy instances with web interfaces accessible to users.

💻 Affected Systems

Products:
  • Grocy
Versions: <= 4.0.2
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All Grocy installations with web interface enabled are vulnerable. The vulnerability exists in the web application layer.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could perform administrative actions like creating new users, modifying system settings, or deleting critical data by tricking an authenticated administrator into clicking a malicious link.

🟠

Likely Case

Attackers could modify inventory data, create unauthorized purchases, or alter user permissions by targeting regular authenticated users.

🟢

If Mitigated

With proper CSRF protections and user awareness, the risk is limited to accidental actions by users who click on untrusted links while authenticated.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires the victim to be authenticated to Grocy and to interact with a malicious webpage or link.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: > 4.0.2

Vendor Advisory: https://github.com/grocy/grocy/releases

Restart Required: Yes

Instructions:

1. Backup your Grocy installation and database. 2. Download the latest Grocy release from GitHub. 3. Replace the existing installation files with the new version. 4. Restart your web server. 5. Verify the application is functioning correctly.

🔧 Temporary Workarounds

Implement CSRF Tokens Manually

all

Add CSRF protection tokens to all state-changing forms and validate them server-side.

Use SameSite Cookie Attribute

all

Configure session cookies with SameSite=Strict attribute to limit cross-site requests.

Set-Cookie: session=value; SameSite=Strict; Secure; HttpOnly

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to detect and block CSRF attempts
  • Educate users about the risks of clicking unknown links while authenticated to Grocy

🔍 How to Verify

Check if Vulnerable:

Check your Grocy version in the web interface under 'About' or by examining the source code version files.

Check Version:

Check the VERSION file in the Grocy installation directory or view the web interface 'About' page.

Verify Fix Applied:

After updating, verify the version shows >4.0.2 and test that forms include CSRF tokens in their HTML.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed state-changing requests from same IP without proper referrer headers
  • Unusual administrative actions from non-admin user accounts

Network Indicators:

  • HTTP POST requests to Grocy endpoints without proper referrer headers or CSRF tokens

SIEM Query:

source="grocy_logs" AND (action="create" OR action="modify" OR action="delete") AND referrer NOT CONTAINS "your-grocy-domain"

🔗 References

📤 Share & Export