Skip to content

XSS due to insufficient escape in dojox.xmpp.util.xmlEncode

Moderate
dylans published GHSA-pg97-ww7h-5mjr Feb 12, 2020

Package

npm dojox (npm)

Affected versions

<1.11.9, 1.12.0-1.12.6, 1.13.0-1.13.5, 1.14.0-1.14.4, 1.15.0-1.15.1, 1.16.0

Patched versions

1.16.1, 1.15.2, 1.14.5, 1.13.6, 1.12.7, 1.11.9

Description

Impact

What kind of vulnerability is it? Who is impacted?

Potential XSS vulnerability for users of dojox/xmpp and dojox/dtl.

Vulnerability

This vulnerability exists due to insufficient XML escaping in dojox.xmpp.util.xmlEncode:

dojox/xmpp/util.js

Lines 5 to 10 in 72db30b

dojox.xmpp.util.xmlEncode = function(str) {
if(str) {
str = str.replace("&", "&amp;").replace(">", "&gt;").replace("<", "&lt;").replace("'", "&apos;").replace('"', "&quot;");
}
return str;
};

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 #315 could get added separately as a patch.

For more information

If you have any questions or comments about this advisory:

Severity

Moderate

CVE ID

CVE-2019-10785

Weaknesses

No CWEs

Credits