← Back to CVE Explorer

CVE-2026-40076

Full vulnerability record from the local CVENow database.

Description

OpenMRS Core is an open source electronic medical record system platform. In versions 2.7.8 and earlier and versions 2.8.0 through 2.8.5, the module upload endpoint at POST `/openmrs/ws/rest/v1/module` is vulnerable to a Zip Slip path traversal attack. During automatic extraction of uploaded .omod archives in `WebModuleUtil.startModule()`, ZIP entries under web/module/ are checked only to see whether the full entry path starts with `..,` and the remaining path is then concatenated into the destination path without normalization or a boundary check. A crafted archive can therefore include entries such as `web/module/../../../../malicious.jsp` and cause files to be written outside the intended module directory. An authenticated attacker with module upload access can write arbitrary files to locations such as the web application root and achieve remote code execution by uploading a JSP file and then requesting it. The issue is compounded by the fact that the module.allow_web_admin runtime property is enforced in the legacy UI controller but not in the REST API upload path, so deployments relying on that property to block web-based module administration remain exposed through the REST endpoint. This issue has been fixed in versions after 2.7.8 in the 2.7.x line and in version 2.8.6 and later.

Severity
CRITICAL
CVSS score
9.4 (v4.0)
Vulnerability status
Analyzed
Source identifier
Published
2026-05-06 20:16:31.727000
Last modified
2026-10-26 19:10:00.163000
View original CVE JSON
{
  "id": "CVE-2026-40076",
  "sourceIdentifier": "[email protected]",
  "published": "2026-05-06T20:16:31.727",
  "lastModified": "2026-10-26T19:10:00.163",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "OpenMRS Core is an open source electronic medical record system platform. In versions 2.7.8 and earlier and versions 2.8.0 through 2.8.5, the module upload endpoint at POST `/openmrs/ws/rest/v1/module` is vulnerable to a Zip Slip path traversal attack. During automatic extraction of uploaded .omod archives in `WebModuleUtil.startModule()`, ZIP entries under web/module/ are checked only to see whether the full entry path starts with `..,` and the remaining path is then concatenated into the destination path without normalization or a boundary check. A crafted archive can therefore include entries such as `web/module/../../../../malicious.jsp` and cause files to be written outside the intended module directory.\n\nAn authenticated attacker with module upload access can write arbitrary files to locations such as the web application root and achieve remote code execution by uploading a JSP file and then requesting it. The issue is compounded by the fact that the module.allow_web_admin runtime property is enforced in the legacy UI controller but not in the REST API upload path, so deployments relying on that property to block web-based module administration remain exposed through the REST endpoint. This issue has been fixed in versions after 2.7.8 in the 2.7.x line and in version 2.8.6 and later."
    },
    {
      "lang": "es",
      "value": "OpenMRS Core es una plataforma de sistema de registro médico electrónico de código abierto. En las versiones 2.7.8 y anteriores y las versiones 2.8.0 a 2.8.5, el endpoint de carga de módulos en POST “/openmrs/ws/rest/v1/module” es vulnerable a un ataque de salto de ruta Zip Slip. Durante la extracción automática de archivos .omod cargados en “WebModuleUtil.startModule()”, las entradas ZIP bajo web/module/ se verifican solo para ver si la ruta de entrada completa comienza con “..,” y la ruta restante se concatena luego en la ruta de destino sin normalización ni una verificación de límites. Un archivo malicioso puede, por lo tanto, incluir entradas como “web/module/.. / .. / .. / .. / malicious.jsp” y hacer que los archivos se escriban fuera del directorio del módulo previsto.\n\nUn atacante autenticado con acceso de carga de módulos puede escribir archivos arbitrarios en ubicaciones como la raíz de la aplicación web y lograr la ejecución remota de código cargando un archivo JSP y luego solicitándolo. El problema se agrava por el hecho de que la propiedad de tiempo de ejecución module.allow_web_admin se aplica en el controlador de UI heredado pero no en la ruta de carga de la API REST, por lo que las implementaciones que dependen de esa propiedad para bloquear la administración de módulos basada en la web permanecen expuestas a través del endpoint REST. Este problema se ha solucionado en versiones posteriores a la 2.7.8 en la línea 2.7.x y en la versión 2.8.6 y posteriores."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "openmrs",
          "product": "openmrs-core",
          "versions": [
            {
              "version": "<= 2.7.8",
              "status": "affected"
            },
            {
              "version": ">= 2.8.0, <= 2.8.5",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV40": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "4.0",
          "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/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": 9.4,
          "baseSeverity": "CRITICAL",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "attackRequirements": "NONE",
          "privilegesRequired": "HIGH",
          "userInteraction": "NONE",
          "vulnConfidentialityImpact": "HIGH",
          "vulnIntegrityImpact": "HIGH",
          "vulnAvailabilityImpact": "HIGH",
          "subConfidentialityImpact": "HIGH",
          "subIntegrityImpact": "HIGH",
          "subAvailabilityImpact": "HIGH",
          "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:N/S:U/C:H/I:H/A:H",
          "baseScore": 8.8,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 5.9
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-05-07T13:48:42.898147Z",
          "id": "CVE-2026-40076",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-22"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:openmrs:openmrs:*:*:*:*:*:*:*:*",
              "versionEndIncluding": "2.7.8",
              "matchCriteriaId": "36ECEBBA-4717-41A7-9BA3-A3F91085CC7D"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:openmrs:openmrs:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "2.8.0",
              "versionEndIncluding": "2.8.5",
              "matchCriteriaId": "3ECCD1F7-883D-47F2-A8F7-939CD497EC86"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/openmrs/openmrs-core/security/advisories/GHSA-78fc-9688-w8xw",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/openmrs/openmrs-core/security/advisories/GHSA-78fc-9688-w8xw",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    }
  ]
}