Vulnerabilities in pkg:npm/valine
PACKAGECVE-2018-19289 is a MODERATE (CVSS 6.1) valine html injection vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Valine libraries in the npm ecosystem. The issue involves valine html injection. Remediation is available by upgrading affected packages to version 1.3.4.
pkg:npm/valine
Vulnerability advisories affecting package pkg:npm/valine. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-hhrp-qm88-xjr3 | CVE-2018-19289 | MODERATE | Valine HTML Injection |
| GHSA-mcvg-g9wx-v5vx | CVE-2022-38545 | CRITICAL | Valine code injection vulnerability |
| GHSA-p2c4-gxp4-j3xp | CVE-2021-34801 | MODERATE | Denial of service in Valine |
| GHSA-6xvq-2gj8-4276 | CVE-2020-28847 | MODERATE | Cross site scripting in valine |
CVE-2018-19289 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2018-19289
To remediate this vulnerability, upgrade all affected Valine dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install valine@1.3.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls valine
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2018-19289, inspect your project dependencies using npm:
npm ls valine
Analyze the terminal output to locate any version of Valine in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.4), your application is affected.
Note: The npm ls valine command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Valine, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2018-19289 Affected Valine Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
valine
|
npm |
< 1.3.4
|
1.3.4
|
References
Frequently Asked Questions
What is CVE-2018-19289?
Which Valine versions are affected?
What version fixes CVE-2018-19289?
Is valine affected?
What is the CVSS score of CVE-2018-19289?
What CWE is associated with CVE-2018-19289?
How can I check npm dependencies for CVE-2018-19289?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hhrp-qm88-xjr3",
"modified" : "2023-09-07T18:23:41Z",
"published" : "2018-11-21T22:19:41Z",
"aliases" : [ "CVE-2018-19289" ],
"summary" : "Valine HTML Injection",
"details" : "An issue was discovered in Valine v1.3.3. It allows HTML injection, which can be exploited for JavaScript execution via an EMBED element in conjunction with a .pdf file.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "valine"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.3.3"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-19289"
}, {
"type" : "WEB",
"url" : "https://github.com/xCss/Valine/issues/127"
}, {
"type" : "WEB",
"url" : "https://github.com/xCss/Valine/commit/32d4d5e68df804f0eabb1a2bebbbf9459e31c2b7"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-hhrp-qm88-xjr3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/xCss/Valine"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:40:20Z",
"nvd_published_at" : null
}
}