CVE-2018-19289: Valine - HTML Injection Vulnerability

valine Updated 02 Oct 2025

Summary

21/11/2018
Yes i
Moderate
6.1

CVE-2018-19289: Valine HTML Injection. Affects valine versions < 1.3.4. Fixed in 1.3.4. 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

Valine is an npm package that provides a lightweight, fast, and efficient comment system for websites. It allows users to add comments to web pages and supports various features such as Markdown, Gravatar, and email notifications. However, Valine version 1.3.3 is vulnerable to HTML injection, which can lead to JavaScript execution when combined with an EMBED element and a .pdf file.

Vulnerability Detail

The vulnerability in Valine version 1.3.3 arises from insufficient input sanitization, allowing an attacker to inject arbitrary HTML code into the comment section. By leveraging this vulnerability, an attacker can execute malicious JavaScript code on the victim's browser. This can lead to various consequences, such as stealing sensitive information, performing unauthorized actions on behalf of the user, or spreading malware.

How To Fix

Latest published version: 1.5.3 as of 23 Oct 2026

npm install valine@1.5.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.3.4

This is the first release that contains the fix.

npm install valine@1.3.4

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

Workaround

As a temporary workaround, developers can implement input validation and sanitization mechanisms to prevent the injection of malicious HTML code. This can be achieved by using libraries or frameworks that offer built-in protection against HTML injection, such as DOMPurify. Additionally, implementing Content Security Policy (CSP) headers can help mitigate the impact of this vulnerability by restricting the execution of injected scripts.

Conclusion

The Valine package version 1.3.3 is vulnerable to HTML injection, which can result in JavaScript execution on the victim's browser. To address this vulnerability, it is crucial to update Valine to a version that includes the necessary security patches. Additionally, implementing input validation, sanitization, and Content Security Policy (CSP) headers can help mitigate the risk. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for valine →

Share this vulnerability

FAQ

Valine is an npm package that provides a comment system for websites, allowing users to add comments to web pages.

HTML injection is a type of vulnerability where an attacker can inject arbitrary HTML code into a web page, potentially leading to various security risks.

The vulnerability in Valine allows an attacker to inject HTML code into the comment section, which can be exploited for JavaScript execution when combined with an EMBED element and a .pdf file.

The consequences of this vulnerability include the ability for an attacker to execute malicious JavaScript code on the victim's browser, potentially leading to data theft, unauthorized actions, or the spread of malware.

To mitigate the risk, it is recommended to upgrade Valine to a patched version, implement input validation and sanitization mechanisms, and consider using Content Security Policy (CSP) headers.

Related vulnerabilities

Recent vulnerabilities recorded for valine.

How To Fix

Latest published version: 1.5.3 as of 23 Oct 2026

npm install valine@1.5.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.3.4

This is the first release that contains the fix.

npm install valine@1.3.4

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