CVE-2017-16043: Shout HTML Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-26q7-g57v-mxcp
CWE-80
Published
Advisory Summary

CVE-2017-16043 is a MODERATE html injection vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Shout libraries in the npm ecosystem. The issue involves html injection in shout. Remediation is available by upgrading affected packages to version 0.50.0.

CVE-2017-16043 at a Glance

CVE Identifier CVE-2017-16043
GHSA Identifier GHSA-26q7-g57v-mxcp
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Affected Product Shout
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2017-16043

To remediate this vulnerability, upgrade all affected Shout dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

shout fixed: 0.50.0
npm install shout@0.50.0
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 shout

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2017-16043, inspect your project dependencies using npm:

npm ls shout

Analyze the terminal output to locate any version of Shout in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.50.0), your application is affected.

Note: The npm ls shout 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-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Shout, 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

Affected versions of `shout` do not escape the `/topic` command in messages, and are therefore vulnerable to cross-site scripting. ## Recommendation Update to version 0.50.0 or later.

CVE-2017-16043 Affected Shout Versions

1 component(s)
Fixed Versions:
0.50.0
Product / Package Ecosystem Affected Versions Fixed Version
shout
npm
≥ 0.44.0
< 0.50.0
0.50.0

References

Frequently Asked Questions

What is CVE-2017-16043?
CVE-2017-16043 is a security vulnerability in Shout involving HTML Injection in shout under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS).
Which Shout versions are affected?
Affected versions include releases prior to 0.50.0 across affected packages: shout.
What version fixes CVE-2017-16043?
Upgrading to 0.50.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shout affected?
Yes, shout is affected in releases prior to 0.50.0. Upgrade your dependency to 0.50.0 or later.
What CWE is associated with CVE-2017-16043?
CVE-2017-16043 is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.).
How can I check npm dependencies for CVE-2017-16043?
Run the dependency tree command: 'npm ls shout'. 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-26q7-g57v-mxcp",
  "modified" : "2020-08-31T18:19:13Z",
  "published" : "2018-11-07T00:28:11Z",
  "aliases" : [ "CVE-2017-16043" ],
  "summary" : "HTML Injection in shout",
  "details" : "Affected versions of `shout` do not escape the `/topic` command in messages, and are therefore vulnerable to cross-site scripting.\n\n\n## Recommendation\n\nUpdate to version 0.50.0 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "shout"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.44.0"
      }, {
        "fixed" : "0.50.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.49.3"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16043"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/erming/shout/pull/344"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-26q7-g57v-mxcp"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/322"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-80" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:51:31Z",
    "nvd_published_at" : null
  }
}