Skip to content

Stored XSS in TimelineJS3

High severity GitHub Reviewed Published Jul 9, 2020 in NUKnightLab/TimelineJS3 • Updated Jan 9, 2023

Package

npm @knight-lab/timelinejs (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:

References

@JoeGermuska JoeGermuska published to NUKnightLab/TimelineJS3 Jul 9, 2020
Reviewed Jul 9, 2020
Published to the GitHub Advisory Database Jul 9, 2020
Last updated Jan 9, 2023

Severity

High
7.2
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2020-15092

GHSA ID

GHSA-2jpm-827p-j44g

Source code

No known source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.