GHSA-h6mq-3cj6-h738: Showdown Reverse Tabnabbing Vulnerability

LOW
CVSS 3.1
CWE-1022
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-h6mq-3cj6-h738
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-1022: Use of Web Link to Untrusted Target with window.opener Access
Affected Product Showdown
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (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.

showdown fixed: 1.9.1
npm install showdown@1.9.1
Verify Direct and Transitive Dependencies

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

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. ## Recommendation Upgrade to version 1.9.1 or later.

GHSA-h6mq-3cj6-h738 Affected Showdown Versions

1 component(s)
Fixed Versions:
1.9.1
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?
GHSA-h6mq-3cj6-h738 is a security vulnerability in Showdown involving Reverse Tabnabbing in showdown under CWE-1022: Use of Web Link to Untrusted Target with window.opener Access.
Which Showdown versions are affected?
Affected versions include releases prior to 1.9.1 across affected packages: showdown.
What version fixes GHSA-h6mq-3cj6-h738?
Upgrading to 1.9.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is showdown affected?
Yes, showdown is affected in releases prior to 1.9.1. Upgrade your dependency to 1.9.1 or later.
What is the CVSS score of GHSA-h6mq-3cj6-h738?
GHSA-h6mq-3cj6-h738 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-h6mq-3cj6-h738?
GHSA-h6mq-3cj6-h738 is classified under CWE-1022: Use of Web Link to Untrusted Target with window.opener Access (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.).
How can I check npm dependencies for GHSA-h6mq-3cj6-h738?
Run the dependency tree command: 'npm ls showdown'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}