CVE-2026-40508
Full vulnerability record from the local CVENow database.
Description
OpenEMR before 8.3.0 contains a stored cross-site scripting vulnerability in the patient portal template import handler that allows authenticated attackers with Forms Administration permissions to upload template files containing arbitrary HTML or JavaScript. Attackers can inject malicious scripts through the template upload functionality, which are stored without sanitization and execute in the browser of any other Forms Administration user who views the template in the HTML editor.
Severity
MEDIUM
CVSS score
5.1
(v4.0)
Vulnerability status
Deferred
Source identifier
Published
2026-08-19 15:17:01.707000
Last modified
2026-10-27 13:10:00.360000
View original CVE JSON
{
"id": "CVE-2026-40508",
"sourceIdentifier": "[email protected]",
"published": "2026-08-19T15:17:01.707",
"lastModified": "2026-10-27T13:10:00.360",
"vulnStatus": "Deferred",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "OpenEMR before 8.3.0 contains a stored cross-site scripting vulnerability in the patient portal template import handler that allows authenticated attackers with Forms Administration permissions to upload template files containing arbitrary HTML or JavaScript. Attackers can inject malicious scripts through the template upload functionality, which are stored without sanitization and execute in the browser of any other Forms Administration user who views the template in the HTML editor."
},
{
"lang": "es",
"value": "OpenEMR antes de 8.3.0 contiene una vulnerabilidad de cross-site scripting almacenado en el gestor de importación de plantillas del portal del paciente que permite a atacantes autenticados con permisos de Administración de Formularios cargar archivos de plantilla que contienen HTML o JavaScript arbitrario. Los atacantes pueden inyectar scripts maliciosos a través de la funcionalidad de carga de plantillas, los cuales se almacenan sin sanitización y se ejecutan en el navegador de cualquier otro usuario de Administración de Formularios que vea la plantilla en el editor HTML."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "openemr",
"product": "openemr",
"defaultStatus": "affected",
"repo": "https://github.com/openemr/openemr",
"packageURL": "pkg:github/openemr/openemr",
"versions": [
{
"version": "0",
"lessThan": "8.3.0",
"versionType": "semver",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV40": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "4.0",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/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": 5.1,
"baseSeverity": "MEDIUM",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"attackRequirements": "NONE",
"privilegesRequired": "LOW",
"userInteraction": "PASSIVE",
"vulnConfidentialityImpact": "NONE",
"vulnIntegrityImpact": "NONE",
"vulnAvailabilityImpact": "NONE",
"subConfidentialityImpact": "LOW",
"subIntegrityImpact": "LOW",
"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": "Secondary",
"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
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-08-19T15:19:49.413560Z",
"id": "CVE-2026-40508",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-79"
}
]
}
],
"references": [
{
"url": "https://github.com/openemr/openemr/commit/ba316dd1d8de1291102da3f20f64240729ff899e",
"source": "[email protected]"
},
{
"url": "https://github.com/openemr/openemr/releases/tag/v8_3_0",
"source": "[email protected]"
},
{
"url": "https://github.com/openemr/openemr/security/advisories/GHSA-5293-8q47-cf44",
"source": "[email protected]"
},
{
"url": "https://www.vulncheck.com/advisories/openemr-stored-xss-via-patient-portal-template-import-handler",
"source": "[email protected]"
},
{
"url": "https://github.com/openemr/openemr/security/advisories/GHSA-5293-8q47-cf44",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
}
]
}