CVE-2023-30838

8.5 HIGH

📋 TL;DR

This vulnerability allows attackers to inject malicious scripts into PrestaShop websites through cross-site scripting (XSS) attacks. The flaw in the ValidateCore::isCleanHTML() method fails to properly sanitize HTML attributes, enabling hijacking of every HTML element without user interaction. All PrestaShop installations prior to versions 8.0.4 and 1.7.8.9 are affected.

💻 Affected Systems

Products:
  • PrestaShop
Versions: All versions prior to 8.0.4 and 1.7.8.9
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All PrestaShop installations using affected versions are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator credentials, hijack user sessions, deface websites, or redirect users to malicious sites, potentially leading to complete compromise of the e-commerce platform and customer data theft.

🟠

Likely Case

Attackers inject malicious scripts to steal session cookies, redirect users to phishing sites, or perform actions on behalf of authenticated users, leading to account compromise and potential financial fraud.

🟢

If Mitigated

With proper input validation and output encoding controls, the attack surface is reduced, but the core vulnerability remains until patched.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability requires no authentication and can be triggered without user interaction, making exploitation straightforward for attackers with basic web security knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 8.0.4 and 1.7.8.9

Vendor Advisory: https://github.com/PrestaShop/PrestaShop/security/advisories/GHSA-fh7r-996q-gvcp

Restart Required: No

Instructions:

1. Backup your PrestaShop installation and database. 2. Update to PrestaShop version 8.0.4 or 1.7.8.9 using the built-in updater or manual installation. 3. Clear cache and verify functionality.

🔧 Temporary Workarounds

Input Validation Enhancement

all

Implement additional input validation to sanitize HTML attributes before processing.

Content Security Policy

all

Implement strict Content Security Policy headers to mitigate XSS impact.

🧯 If You Can't Patch

  • Implement Web Application Firewall (WAF) rules to block XSS payloads targeting HTML attributes
  • Enable strict Content Security Policy (CSP) headers to limit script execution

🔍 How to Verify

Check if Vulnerable:

Check PrestaShop version in administration panel or examine /config/settings.inc.php file for version information.

Check Version:

Check PrestaShop admin dashboard or examine PS_VERSION in configuration files.

Verify Fix Applied:

Verify version is 8.0.4 or higher (for v8) or 1.7.8.9 or higher (for v1.7). Test HTML input fields for proper sanitization.

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTML attribute patterns in input fields
  • Multiple failed sanitization attempts
  • Suspicious script injection attempts in logs

Network Indicators:

  • HTTP requests containing malicious HTML attribute payloads
  • Unusual traffic patterns to input processing endpoints

SIEM Query:

search 'PrestaShop' AND ('XSS' OR 'script' OR 'on*=') in web server logs

🔗 References

📤 Share & Export