CVE-2024-32468
JSON

5.4medium

Improper neutralization of input during web page generation ("Cross-site Scripting") in deno_doc HTML generator

Severity
5.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.35% (higher than 31% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-qqwr-j9mm-fhw6

Description

Deno is a runtime for JavaScript and TypeScript written in rust. Several cross-site scripting vulnerabilities existed in the `deno_doc` crate which lead to Self-XSS with deno doc --html. 1.) XSS in generated `search_index.js`, `deno_doc` outputs a JavaScript file for searching. However, the generated file used `innerHTML` on unsanitzed HTML input. 2.) XSS via property, method and enum names, `deno_doc` did not sanitize property names, method names and enum names. The first XSS most likely didn't have an impact since `deno doc --html` is expected to be used locally with own packages.

Affected

Product or packageVersionsReported by
denoland denodeno_doc: < 0.119.0, deno: < 1.42.0CVE List
deno_doc (crates.io)before 0.119.0GitHub Advisory Database

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
GitHub5.4low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
GitHublow CVSS:4.0CVSS: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:P

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Deno is a runtime for JavaScript and TypeScript written in rust. Several cross-site scripting vulnerabilities existed in the `deno_doc` crate which lead to Self-XSS with deno doc --html. 1.) XSS in generated `search_index.js`, `deno_doc` outputs a JavaScript file for searching. However, the generated file used `innerHTML` on unsanitzed HTML input. 2.) XSS via property, method and enum names, `deno_doc` did not sanitize property names, method names and enum names. The first XSS most likely didn't have an impact since `deno doc --html` is expected to be used locally with own packages.

GitHub Advisory Database
Summary

Several cross-site scripting vulnerabilities existed in the deno_doc crate which lead to Self-XSS with deno doc --html.

Details & PoC

1.) XSS in generated search_index.js

deno_doc outputed a JavaScript file for searching. However, the generated file used innerHTML on unsanitzed HTML input.

https://github.com/denoland/deno_doc/blob/dc556c848831d7ae48f3eff2ababc6e75eb6b73e/src/html/templates/pages/search.js#L120-L144

2.) XSS via property, method and enum names

deno_doc did not sanitize property names, method names and enum names.

Impact

The first XSS most likely didn't have an impact since deno doc --html is expected to be used locally with own packages.

NVD (es)

Deno es un entorno de ejecución para JavaScript y TypeScript escrito en rust. Existían varias vulnerabilidades de cross-site scripting en el crate `deno_doc` que conducían a Self-XSS con deno doc --html. 1.) XSS en `search_index.js` generado, `deno_doc` genera un archivo JavaScript para realizar búsquedas. Sin embargo, el archivo generado utilizó `innerHTML` en la entrada HTML no desinfectada. 2.) XSS a través de nombres de propiedades, métodos y enumeraciones, `deno_doc` no saneó los nombres de propiedades, métodos y enumeraciones. Lo más probable es que el primer XSS no haya tenido un impacto ya que se espera que `deno doc --html` se use localmente con paquetes propios.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-32468 changed 2024-11-25CVE Terms of Use
GitHub Advisory DatabaseGHSA-qqwr-j9mm-fhw6 changed 2024-11-25CC-BY-4.0
NVDCVE-2024-32468 changed 2026-06-17Public domain