Skip to content

Stored XSS vulnerability when rendering data

Moderate
JoeGermuska published GHSA-2jpm-827p-j44g Jul 9, 2020

Package

npm timelinejs3 (npm)

Affected versions

< 3.7.0

Patched versions

3.7.0

Description

Impact

TimelineJS renders some user data as HTML. An attacker could implement an XSS exploit with maliciously crafted content in a number of data fields. This risk is present whether the source data for the timeline is stored on Google Sheets or in a JSON configuration file.

Most TimelineJS users configure their timeline with a Google Sheets document. Those users are exposed to this vulnerability if they grant write access to the document to a malicious inside attacker, if the access of a trusted user is compromised, or if they grant public write access to the document.

Some TimelineJS users configure their timeline with a JSON document. Those users are exposed to this vulnerability if they grant write access to the document to a malicious inside attacker, if the access of a trusted user is compromised, or if write access to the system hosting that document is otherwise compromised.

Although the vulnerability has a CVSS v3.1 base score of 7.2, this vulnerability has a severity of Moderate due to the likeliness of exploitation.

Patches

Version 3.7.0 of TimelineJS addresses this in two ways.

  1. For content which is intended to support limited HTML markup for styling and linking, that content is "sanitized" before being added to the DOM.
  2. For content intended for simple text display, all markup is stripped.

Very few users of TimelineJS actually install the TimelineJS code on their server. Most users publish a timeline using a URL hosted on systems we control. The fix for this issue is published to our system such that those users will automatically begin using the new code. The only exception would be users who have deliberately edited the embed URL to "pin" their timeline to an earlier version of the code.

Some users of TimelineJS use it as a part of a wordpress plugin. Version 3.7.0.0 of that plugin and newer integrate the updated code. Users are encouraged to update the plugin rather than manually update the embedded version of TimelineJS.

Workarounds

To exploit this vulnerability, the attacker must have write access to the data source for the Timeline or the server which embeds the timeline.

Thus, the only workaround is appropriate attention to securing write access to the Google Sheet or JSON file which serves as the data source.

References

For more about the release of TimelineJS which addresses this vulnerability, see the Knight Lab website.

A technical write-up of this vulnerability is available here.

Acknowledgements

This vulnerability was discovered by Zander Work (@captainGeech42) of Oregon State University.

For more information

If you have any questions or comments about this advisory:

Severity

Moderate

CVE ID

CVE-2020-15092

Weaknesses

No CWEs

Credits