CVE-2021-32818: Insecure template handling in haml-coffee

haml-coffee Updated 02 Oct 2025

Summary

17/05/2021
No i
High
7.7

CVE-2021-32818: Insecure template handling in haml-coffee. Affects haml-coffee versions < 1.14.1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

haml-coffee is a JavaScript templating solution that mixes pure template data with engine configuration options through the Express render API. It supports overriding HTML helper functions through its configuration options. The latest version of haml-coffee is 1.14.1.

Vulnerability Detail

The vulnerability in haml-coffee allows for remote code execution (RCE) if a vulnerable application passes user-controlled request objects to the template engine. Additionally, control over the escapeHtml parameter through template configuration pollution can lead to reflected Cross-Site Scripting (XSS) attacks against downstream applications. The issue has a severity rating of HIGH (CVSS score: 7.7).

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

No workaround is available for this vulnerability.

Conclusion

The vulnerability in haml-coffee exposes applications to potential remote code execution (RCE) and reflected Cross-Site Scripting (XSS) attacks. It is important to stay updated on security advisories and apply the latest version of haml-coffee once a fix is available. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for haml-coffee →

Share this vulnerability

FAQ

haml-coffee is a JavaScript templating solution that allows for the creation of dynamic HTML templates.

The vulnerability can lead to remote code execution (RCE) and reflected Cross-Site Scripting (XSS) attacks.

No, there is currently no fix available. It is recommended to monitor for updates and apply the latest version of haml-coffee once a fix is released.

Regularly check for security advisories, follow best practices for secure template handling, and consider alternative templating solutions if necessary.

You can find more information about this vulnerability in the referenced GHSL-2021-025 advisory.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback