CVE-2025-4282

4.3 MEDIUM

📋 TL;DR

This CVE describes a Cross-Site Request Forgery (CSRF) vulnerability in the SourceCodester/oretnom23 Stock Management System 1.0. Attackers can trick authenticated users into performing unintended actions by manipulating requests to the /classes/Users.php?f=save endpoint. All users of this specific stock management system version are affected.

💻 Affected Systems

Products:
  • SourceCodester/oretnom23 Stock Management System
Versions: 1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation. Any system with this specific version is vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could create malicious requests that trick administrators into creating new admin accounts, modifying user permissions, or deleting critical data, potentially leading to complete system compromise.

🟠

Likely Case

Attackers trick authenticated users into changing their own passwords or modifying their account settings, leading to account takeover or data manipulation.

🟢

If Mitigated

With proper CSRF tokens and same-site cookie policies, the attack would fail as legitimate requests would be properly validated.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available on GitHub. CSRF attacks are well-understood and easy to weaponize with basic web development skills.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider implementing CSRF protection manually or replacing the software.

🔧 Temporary Workarounds

Implement CSRF Token Protection

all

Add CSRF tokens to all state-changing forms and validate them server-side before processing requests.

Enable SameSite Cookie Attributes

all

Set SameSite=Strict or SameSite=Lax attributes on session cookies to prevent cross-site requests.

🧯 If You Can't Patch

  • Implement a Web Application Firewall (WAF) with CSRF protection rules
  • Restrict access to the vulnerable system to trusted networks only

🔍 How to Verify

Check if Vulnerable:

Check if the file /classes/Users.php exists and if requests to it with parameter f=save lack CSRF token validation.

Check Version:

Check the software version in the system's admin panel or configuration files.

Verify Fix Applied:

Test that all POST requests to /classes/Users.php?f=save require and validate a CSRF token.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed POST requests to /classes/Users.php?f=save from different referrers
  • Unusual user account modifications

Network Indicators:

  • Cross-origin requests to the vulnerable endpoint without proper referrer validation

SIEM Query:

source="web_logs" AND uri="/classes/Users.php" AND param="f=save" AND referrer NOT CONTAINS "yourdomain.com"

🔗 References

📤 Share & Export