GHSA-h6mq-3cj6-h738: Showdown Reverse Tabnabbing Vulnerability
LOWGHSA-h6mq-3cj6-h738 is a LOW (CVSS 3.1) reverse tabnabbing vulnerability (CWE-1022: Use of Web Link to Untrusted Target with window.opener Access) affecting Showdown libraries in the npm ecosystem. The issue involves reverse tabnabbing in showdown. Remediation is available by upgrading affected packages to version 1.9.1.
GHSA-h6mq-3cj6-h738 at a Glance
Security Impact
CVSS: 3.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N).
How to Fix GHSA-h6mq-3cj6-h738
To remediate this vulnerability, upgrade all affected Showdown 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 showdown@1.9.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls showdown
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-h6mq-3cj6-h738, inspect your project dependencies using npm:
npm ls showdown
Analyze the terminal output to locate any version of Showdown in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.1), your application is affected.
Note: The npm ls showdown 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-1022: Use of Web Link to Untrusted Target with window.opener Access, where the web application produces links to untrusted external sites outside of its sphere of control, but it does not properly prevent the external site from modifying security-critical properties of the window.opener object, such as the location property. In Showdown, 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
GHSA-h6mq-3cj6-h738 Affected Showdown Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
showdown
|
npm |
< 1.9.1
|
1.9.1
|
References
Frequently Asked Questions
What is GHSA-h6mq-3cj6-h738?
Which Showdown versions are affected?
What version fixes GHSA-h6mq-3cj6-h738?
Is showdown affected?
What is the CVSS score of GHSA-h6mq-3cj6-h738?
What CWE is associated with GHSA-h6mq-3cj6-h738?
How can I check npm dependencies for GHSA-h6mq-3cj6-h738?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h6mq-3cj6-h738",
"modified" : "2021-10-01T16:12:36Z",
"published" : "2020-09-03T23:21:16Z",
"aliases" : [ ],
"summary" : "Reverse Tabnabbing in showdown",
"details" : "Versions of `showdown` prior to 1.9.1 are vulnerable to [Reverse Tabnabbing](https://www.owasp.org/index.php/Reverse_Tabnabbing). The package uses `target='_blank'` in anchor tags, allowing attackers to access `window.opener` for the original page when opening links. This is commonly used for phishing attacks.\n\n\n## Recommendation\n\nUpgrade to version 1.9.1 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "showdown"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/showdownjs/showdown/pull/670"
}, {
"type" : "WEB",
"url" : "https://github.com/showdownjs/showdown/commit/1cd281f0643ef613dc1d36847d4c6cbb22501d91"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/showdownjs/showdown"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-SHOWDOWN-469487"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1302"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1022" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:54:24Z",
"nvd_published_at" : null
}
}