# CVE-2021-32818: Remote code execution and Reflected cross site scripting in haml-coffee

- Severity: High 7.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.70%, higher than 54% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-05-14T18:20:18.000Z
- Modified: 2026-06-17T03:53:41.673Z
- Also known as: GHSA-m7mf-vm62-7x3q
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## Description

haml-coffee is a JavaScript templating solution. haml-coffee mixes pure template data with engine configuration options through the Express render API. More specifically, haml-coffee supports overriding a series of HTML helper functions through its configuration options. A vulnerable application that passes user controlled request objects to the haml-coffee template engine may introduce RCE vulnerabilities. Additionally control over the escapeHtml parameter through template configuration pollution ensures that haml-coffee would not sanitize template inputs that may result in reflected Cross Site Scripting attacks against downstream applications. There is currently no fix for these issues as of the publication of this CVE. The latest version of haml-coffee is currently 1.14.1. For complete details refer to the referenced GHSL-2021-025.

(As written by CVE List.)

## Affected

- netzpirat haml-coffee: <= 1.14.1
- haml-coffee (npm): up to 1.14.1
- haml-coffee_project haml-coffee: up to 1.14.1

## Every score

- GitHub_M: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- GitHub: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 3.5 Low `AV:N/AC:M/Au:S/C:N/I:P/A:N`

## References

- <https://www.npmjs.com/package/haml-coffee> (exploit, product, web)
- <https://securitylab.github.com/advisories/GHSL-2021-025-haml-coffee/> (third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32818> (advisory)
- <https://securitylab.github.com/advisories/GHSL-2021-025-haml-coffee> (advisory)

## Sources

- CVE List: [CVE-2021-32818](https://www.cve.org/CVERecord?id=CVE-2021-32818), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-m7mf-vm62-7x3q](https://github.com/advisories/GHSA-m7mf-vm62-7x3q), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-32818](https://nvd.nist.gov/vuln/detail/CVE-2021-32818), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-32818 · Whole record: https://cve.day/CVE-2021-32818.json · Rebuilt by cve.day 2026-11-25T22:58:01.350Z
