/

CVE-2026-33673

Severity:

HIGH RISK

(7.6)

XSS in PrestaShop Back Office Templates

CVE-2026-33673

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored XSS in back-office leading to execution of arbitrary JavaScript in administrators' browsers

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

PrestaShop versions prior to 8.2.5 and 9.1.0 contain a stored Cross-Site Scripting (XSS) vulnerability in the back office (BO) that allows attacker-controlled data from the database to be rendered without proper escaping.

If an attacker can inject malicious content into database fields that are later displayed in BO templates, they may execute arbitrary JavaScript in the browser of any back-office user viewing those pages.

Affected context

This vulnerability affects PrestaShop deployments where back-office templates render values from the database without consistently applying output encoding.

It becomes relevant when:

  • Data from user-controlled or semi-trusted sources is persisted in the database
  • Those fields are later displayed in the PrestaShop back office views
  • The templates do not enforce context-appropriate escaping (HTML, attribute, or JavaScript)

Environments with multiple back-office users or with integrations that can write to the database are particularly exposed.

Exploit preconditions

  • Attack surface: PrestaShop back office (BO) web interface.
  • Required access: Ability to inject or influence data stored in the database that is later rendered in BO templates. This may be via:
  • Limited/low-privileged back-office access, or
  • Another application or plugin vulnerability that permits arbitrary data insertion.
  • Trigger point: A back-office user (such as an administrator, merchant, or support staff) loads a BO page that displays the maliciously crafted database content.
  • Why exploitation is possible: Certain variables in BO templates are rendered without proper output encoding or sanitization, allowing embedded script payloads to execute in the browser context when the page is viewed.

Why this happens

The underlying issue is insufficient output encoding in back-office templates that render data from the database.

In affected versions, some template variables are treated as safe and emitted directly into the HTML or related contexts without applying context-appropriate escaping.

This maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting), where untrusted or partially trusted data is incorporated into web pages and interpreted as active content by the browser.

The bug class is a template-layer trust error: data is assumed to be safe because it originates from the database or from "internal" flows, but it can actually be controlled or influenced by an attacker with constrained access.

Potential impact

  • Execution of arbitrary JavaScript in the browsers of back-office users who view affected pages
  • Theft of session identifiers or other sensitive browser-stored data from BO users
  • Impersonation of back-office users and performance of actions on their behalf (e.g., configuration changes, order manipulation)
  • Injection or modification of content in the back office UI, potentially misleading administrators
  • Pivoting to other vulnerabilities or systems by leveraging compromised BO accounts or stored credentials

General mitigation guidance

Effective mitigation focuses on enforcing strict output encoding policies and reducing trust in database-sourced content:

  • Apply context-aware output encoding for all variables rendered in templates (HTML, attribute, URL, JavaScript contexts).
  • Treat all database values as untrusted unless explicitly normalized, and avoid rendering raw HTML from such fields.
  • Centralize escaping practices (e.g., through a templating engine that escapes by default) and avoid bypass mechanisms except in narrowly-reviewed cases.
  • Restrict who and what can write to database fields that are later displayed in the back office; minimize direct HTML input where possible.
  • Employ least-privilege principles for BO roles to limit the blast radius if a low-privilege account is abused for payload injection.

How teams detect issues like this

Detection typically combines code-level analysis, review of templates, and behavioral monitoring:

  • Use static analysis or template linters to identify unescaped variable outputs in BO templates, especially those sourced from user- or integration-controlled data.
  • During code review, flag any usage of constructs that bypass default escaping or inject raw HTML, and verify that they cannot be influenced by untrusted input.
  • Implement Content Security Policy (CSP) to make exploitation more visible (e.g., report-only CSP violation reports can highlight inline script execution).
  • Leverage automated security testing (e.g., DAST tools) focused on BO endpoints to probe for reflected or stored XSS conditions.
  • Maintain secure coding guidelines and review checklists for developers working on template and back-office UI logic to ensure consistent escaping practices.

Sources

SourceLink
github.comgithub.com/PrestaShop/PrestaShop/releases/tag/8.2.5
github.comgithub.com/PrestaShop/PrestaShop/releases/tag/9.1.0
github.comgithub.com/PrestaShop/PrestaShop/security/advisories/GHSA-35pf-37c6-jxjv

Frequently asked

questions

Yes, but only if the attacker can cause malicious content to be stored in the database and subsequently viewed in the back office. This often requires either some form of access to BO or exploitation of another bug or integration to inject data.

The attacker typically needs at least limited ability to influence database-backed fields that appear in the BO. This may be through low-privileged BO accounts, compromised modules, or other input channels that ultimately persist data.

The most reliable fix is to enforce context-aware output encoding for all rendered variables and to ensure templates escape data by default. Any intentional rendering of raw HTML should be narrowly scoped, strongly justified, and guarded by strict validation.

Preventive measures include adopting template engines that escape by default, institutionalizing secure coding standards around output encoding, applying defense-in-depth measures like CSP, and integrating automated checks (static analysis and security tests) into the development and review pipeline for all UI and template changes.

Find out what's already
exploitable in your codebase.