SecurityContext

CVE-2021-32818: haml-coffee - Remote Code Execution & Reflected XSS

  • Cve: CVE-2021-32818
  • Name: haml-coffee - Remote Code Execution & Reflected XSS
  • 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.
  • Impact: Attackers can execute arbitrary code or perform reflected XSS attacks, potentially compromising server or client security.
  • Remediation: No fix available; update to the latest version 1.14.1 or apply security best practices to mitigate risks.
  • Vulnerability type: template_injection
  • Vulnerability impact: remote_code_execution, client_script_exec
  • Requirement type: user_interaction
  • Requirements: Attacker needs to pass malicious request data
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.4
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Epss score: 0.007
  • Epss percentile: 0.53895
  • Assignee: [email protected]
  • Published at: 2021-05-14T19:15:07Z
  • Age in days: 2020
  • Modified at: 2026-06-17T03:53:41Z
  • Public exploits total: 1
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-32818
  • Nvd status: modified
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-79Improper Neutralization of Input During Web Page Generation

Public exploits

UrlSourceAdded date
https://www.npmjs.com/package/haml-coffeenvd2021-05-14

References

UrlSourceTags
https://www.npmjs.com/package/haml-coffeenvdExploit, Product
https://securitylab.github.com/advisories/GHSL-2021-025-haml-coffee/nvdThird Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
haml-coffee_project:haml-coffee<= 1.14.1nonvd/v1/products/haml-coffee_project/haml-coffee

Projects

RepositoryLink kindsIndexedUrl
netzpirat/haml-coffeeproductyes/v1/repositories/netzpirat/haml-coffee

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2021-05-14
  • Remote: yes
  • Authentication required: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts