CVE-2019-10785: Dojox Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-pg97-ww7h-5mjr
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2019-10785 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Dojox libraries in the npm ecosystem. The issue involves xss in dojox due to insufficient escape in dojox.xmpp.util.xmlencode. Remediation is available by upgrading affected packages to version 1.11.9, 1.12.7, 1.13.6, 1.14.5, 1.15.2, 1.16.1.

CVE-2019-10785 at a Glance

CVE Identifier CVE-2019-10785
GHSA Identifier GHSA-pg97-ww7h-5mjr
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Dojox
Package Ecosystem npm
Published Date
Last Updated

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2019-10785

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

dojox fixed: 1.11.9
npm install dojox@1.11.9
dojox fixed: 1.12.7
npm install dojox@1.12.7
dojox fixed: 1.13.6
npm install dojox@1.13.6
dojox fixed: 1.14.5
npm install dojox@1.14.5
dojox fixed: 1.15.2
npm install dojox@1.15.2
dojox fixed: 1.16.1
npm install dojox@1.16.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 dojox

How to Check if You Are Affected

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

npm ls dojox

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

Note: The npm ls dojox 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 Dojox, 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

### Impact _What kind of vulnerability is it? Who is impacted?_ Potential XSS vulnerability for users of `dojox/xmpp` and `dojox/dtl`. ### Patches _Has the problem been patched? What versions should users upgrade to?_ Yes, patches are available for the 1.11 through 1.16 versions. Users should upgrade to one of these versions of Dojo: * 1.16.1 * 1.15.2 * 1.14.5 * 1.13.6 * 1.12.7 * 1.11.9 Users of Dojo 1.10.x and earlier should review this change and determine if it impacts them, and backport the change as appropriate. ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ The change applied in https://github.com/dojo/dojox/pull/315 could get added separately as a patch. ### For more information If you have any questions or comments about this advisory: * Open an issue in [dojo/dojox](https://github.com/dojo/dojox/)

CVE-2019-10785 Affected Dojox Versions

6 component(s)
Fixed Versions:
1.11.91.12.71.13.61.14.51.15.21.16.1
Product / Package Ecosystem Affected Versions Fixed Version
dojox
npm
< 1.11.9
1.11.9
dojox
npm
≥ 1.12.0
< 1.12.7
1.12.7
dojox
npm
≥ 1.13.0
< 1.13.6
1.13.6
dojox
npm
≥ 1.14.0
< 1.14.5
1.14.5
dojox
npm
≥ 1.15.0
< 1.15.2
1.15.2
dojox
npm
≥ 1.16.0
< 1.16.1
All 1 versions
1.16.0
1.16.1

References

Frequently Asked Questions

What is CVE-2019-10785?
CVE-2019-10785 is a security vulnerability in Dojox involving XSS in dojox due to insufficient escape in dojox.xmpp.util.xmlEncode under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Dojox versions are affected?
Affected versions include releases prior to 1.11.9, 1.12.7, 1.13.6, 1.14.5, 1.15.2, 1.16.1 across affected packages: dojox.
What version fixes CVE-2019-10785?
Upgrading to 1.11.9, 1.12.7, 1.13.6, 1.14.5, 1.15.2, 1.16.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dojox affected?
Yes, dojox is affected in releases prior to 1.11.9, 1.12.7, 1.13.6, 1.14.5, 1.15.2, 1.16.1. Upgrade your dependency to 1.11.9, 1.12.7, 1.13.6, 1.14.5, 1.15.2, 1.16.1 or later.
What is the CVSS score of CVE-2019-10785?
CVE-2019-10785 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2019-10785?
CVE-2019-10785 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check npm dependencies for CVE-2019-10785?
Run the dependency tree command: 'npm ls dojox'. 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-pg97-ww7h-5mjr",
  "modified" : "2021-08-19T17:21:06Z",
  "published" : "2020-02-13T22:21:06Z",
  "aliases" : [ "CVE-2019-10785" ],
  "summary" : "XSS in dojox due to insufficient escape in dojox.xmpp.util.xmlEncode ",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nPotential XSS vulnerability for users of `dojox/xmpp` and `dojox/dtl`.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nYes, patches are available for the 1.11 through 1.16 versions. Users should upgrade to one of these versions of Dojo:\n\n* 1.16.1\n* 1.15.2\n* 1.14.5\n* 1.13.6\n* 1.12.7\n* 1.11.9\n\nUsers of Dojo 1.10.x and earlier should review this change and determine if it impacts them, and backport the change as appropriate.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nThe change applied in https://github.com/dojo/dojox/pull/315 could get added separately as a patch.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [dojo/dojox](https://github.com/dojo/dojox/)",
  "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" : "dojox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "dojox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.12.0"
      }, {
        "fixed" : "1.12.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "dojox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13.0"
      }, {
        "fixed" : "1.13.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "dojox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.14.0"
      }, {
        "fixed" : "1.14.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "dojox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.15.0"
      }, {
        "fixed" : "1.15.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "dojox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.16.0"
      }, {
        "fixed" : "1.16.1"
      } ]
    } ],
    "versions" : [ "1.16.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dojo/dojox/security/advisories/GHSA-pg97-ww7h-5mjr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-10785"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dojo/dojox/pull/315"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dojo/dojox/commit/abd033a787c718abc1a390f480ac3ea61288e5ee"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2020/02/msg00033.html"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-DOJOX-548257"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-DOJOX-548257,"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-02-13T22:20:36Z",
    "nvd_published_at" : null
  }
}