Cross-Site Scripting Vulnerability in htmr

htmr Updated 02 Oct 2025

Summary

03/09/2020
HIGH
Yes i
High
Not published

GHSA-f8rq-m28h-8hxj: Cross-Site Scripting in htmr. Affects htmr versions < 0.8.7. Fixed in 0.8.7. 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

The htmr package is an npm package used for converting HTML strings into React components. It is commonly used in web development projects to render HTML content. However, versions prior to 0.8.7 of htmr are vulnerable to a Cross-Site Scripting (XSS) attack.

Vulnerability Detail

The vulnerability in htmr arises from the use of innerHTML to unescape HTML entities. This can allow an attacker to inject malicious JavaScript code into a victim's browser, leading to potential execution of arbitrary code. This type of attack is known as DOM-based XSS and can have severe consequences, including unauthorized access to sensitive information or the manipulation of user interactions on a website.

How To Fix

Minimum fixed version

0.8.7

This is the first release that contains the fix.

npm install htmr@0.8.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The htmr package prior to version 0.8.7 is vulnerable to Cross-Site Scripting (XSS) attacks. It is crucial to upgrade to the latest version to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for htmr →

Share this vulnerability

FAQ

htmr is an npm package used for converting HTML strings into React components. It is commonly used in web development projects.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to the execution of arbitrary code in the victim's browser.

DOM-based XSS is a specific type of XSS attack that occurs when the vulnerability is in the client-side code rather than the server-side code. It involves the manipulation of the Document Object Model (DOM) of a web page to execute malicious scripts.

The consequences of this vulnerability can vary, but they may include unauthorized access to sensitive information, manipulation of user interactions on a website, or the spread of malware to other users.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and the tool will provide real-time alerts for open-source vulnerabilities.

How To Fix

Minimum fixed version

0.8.7

This is the first release that contains the fix.

npm install htmr@0.8.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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