CVE-2024-23873

8.2 HIGH

📋 TL;DR

CVE-2024-23873 is a stored cross-site scripting (XSS) vulnerability in Cups Easy Purchase & Inventory version 1.0 that allows attackers to inject malicious scripts via the currencyid parameter in currencymodify.php. This affects all users running the vulnerable version of Cups Easy, particularly those with internet-facing installations. Successful exploitation could lead to session hijacking and unauthorized access to administrative functions.

💻 Affected Systems

Products:
  • Cups Easy (Purchase & Inventory)
Versions: 1.0
Operating Systems: All platforms running PHP web servers
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authentication to exploit, but any authenticated user can be targeted via crafted URLs.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attacker steals administrator session cookies, gains full administrative access to the application, manipulates financial data, inventory records, and potentially compromises the entire system.

🟠

Likely Case

Attacker steals authenticated user sessions to perform unauthorized actions within the application, potentially modifying purchase orders, inventory data, or financial records.

🟢

If Mitigated

With proper input validation and output encoding, the attack is prevented, maintaining normal application functionality with no security impact.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires sending a crafted URL to an authenticated user, making it suitable for phishing attacks.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: https://www.incibe.es/en/incibe-cert/notices/aviso/multiple-vulnerabilities-cups-easy

Restart Required: No

Instructions:

1. Review the INCIBE advisory for details. 2. Implement input validation and output encoding in currencymodify.php. 3. Sanitize the currencyid parameter before processing.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to only accept numeric values for currencyid parameter

// PHP example: if(!is_numeric($_GET['currencyid'])) { die('Invalid input'); }

Web Application Firewall Rule

all

Block requests containing script tags or JavaScript in currencyid parameter

WAF rule: SecRule ARGS:currencyid "@rx <script" "id:1001,phase:2,deny"

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to prevent script execution from untrusted sources
  • Use HTTP-only and Secure flags for session cookies to make them inaccessible to JavaScript

🔍 How to Verify

Check if Vulnerable:

Test by injecting a simple XSS payload like <script>alert('test')</script> into the currencyid parameter of currencymodify.php while authenticated

Check Version:

Check application version in admin panel or review source code for version markers

Verify Fix Applied:

Attempt the same XSS injection; if the script doesn't execute and input is properly sanitized, the fix is working

📡 Detection & Monitoring

Log Indicators:

  • Unusual GET requests to /cupseasylive/currencymodify.php with script tags or JavaScript in parameters
  • Multiple failed authentication attempts followed by successful access to currencymodify.php

Network Indicators:

  • HTTP requests containing <script> tags in URL parameters
  • Unusual outbound connections from web server following access to currencymodify.php

SIEM Query:

source="web_logs" AND uri="/cupseasylive/currencymodify.php" AND (param="currencyid" AND value MATCHES "<script")

🔗 References

📤 Share & Export