CVE-2021-41088
JSON

8.0high

Remote code execution via the web UI backend of Elvish

Severity
8.0high CVSS:3.1 by GitHub_M
Exploit likelihood
0.54% (higher than 46% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-fpv6-f8jw-rc3rGO-2022-0937

Description

Elvish is a programming language and interactive shell, combined into one package. In versions prior to 0.14.0 Elvish's web UI backend (started by `elvish -web`) hosts an endpoint that allows executing the code sent from the web UI. The backend does not check the origin of requests correctly. As a result, if the user has the web UI backend open and visits a compromised or malicious website, the website can send arbitrary code to the endpoint in localhost. All Elvish releases from 0.14.0 onward no longer include the the web UI, although it is still possible for the user to build a version from source that includes the web UI. The issue can be patched for previous versions by removing the web UI (found in web, pkg/web or pkg/prog/web, depending on the exact version).

Affected

Product or packageVersionsReported by
elves elvish< 0.14.0CVE List
github.com/elves/elvish (Go)before 0.14.0GitHub Advisory Database, Go Vulnerability Database
elv elvishbefore 0.14.0NVD

All scores

GitHub_M8.0high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
GitHub8.0high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD9.3high CVSS:2.0AV:N/AC:M/Au:N/C:C/I:C/A:C

Classification

What each source says

CVE List

Elvish is a programming language and interactive shell, combined into one package. In versions prior to 0.14.0 Elvish's web UI backend (started by `elvish -web`) hosts an endpoint that allows executing the code sent from the web UI. The backend does not check the origin of requests correctly. As a result, if the user has the web UI backend open and visits a compromised or malicious website, the website can send arbitrary code to the endpoint in localhost. All Elvish releases from 0.14.0 onward no longer include the the web UI, although it is still possible for the user to build a version from source that includes the web UI. The issue can be patched for previous versions by removing the web UI (found in web, pkg/web or pkg/prog/web, depending on the exact version).

GitHub Advisory Database
Impact

Elvish's backend for the experimental web UI (started by elvish -web) hosts an endpoint that allows executing the code sent from the web UI.

The backend does not check the origin of requests correctly. As a result, if the user has the web UI backend open and visits a compromised or malicious website, the website can send arbitrary code to the endpoint in localhost.

Patches

All Elvish releases since 0.14.0 no longer include the experimental web UI, although it is still possible for the user to build a version from source that includes it.

The issue can be patched for previous versions by removing the web UI (found in web, pkg/web or pkg/prog/web, depending on the exact version).

Workarounds

Do not use the experimental web UI.

For more information

If you have any questions or comments about this advisory, please email xiaqqaix@gmail.com.

Go Vulnerability Database

Elvish vulnerable to remote code execution via the web UI backend in github.com/elves/elvish

NVD (es)

Elvish es un lenguaje de programación y un shell interactivo, combinados en un solo paquete. En versiones anteriores a 0.14.0, el backend de la Interfaz Web de Elvish (iniciado por "elvish -web") aloja un endpoint que permite ejecutar el código enviado desde la interfaz web. El backend no comprueba correctamente el origen de las peticiones. Como resultado, si el usuario tiene el backend de la interfaz web abierto y visita un sitio web comprometido o malicioso, el sitio web puede enviar código arbitrario al endpoint en localhost. Todas las versiones de Elvish a partir de la 0.14.0, ya no incluyen la Interfaz de Usuario web, aunque todavía es posible que el usuario construya una versión desde el código fuente que incluya la Interfaz de Usuario web. El problema puede ser parcheado para las versiones anteriores eliminando la Interfaz de Usuario web (que se encuentra en web, pkg/web o pkg/prog/web, dependiendo de la versión exacta)

References

Sources

SourceRecordLicence
CVE ListCVE-2021-41088 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-fpv6-f8jw-rc3r changed 2026-07-08CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0937 changed 2026-03-03CC-BY-4.0
NVDCVE-2021-41088 changed 2026-06-17Public domain