Lucene search

K
githubGitHub Advisory DatabaseGHSA-2JPM-827P-J44G
HistoryJul 09, 2020 - 6:28 p.m.

Stored XSS in TimelineJS3

2020-07-0918:28:07
CWE-79
GitHub Advisory Database
github.com
30

3.5 Low

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

SINGLE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:S/C:N/I:P/A:N

7.2 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

0.001 Low

EPSS

Percentile

22.7%

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:

Affected configurations

Vulners
Node
knight-labtimelinejsRange<3.7.0
CPENameOperatorVersion
@knight-lab/timelinejslt3.7.0

3.5 Low

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

SINGLE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:S/C:N/I:P/A:N

7.2 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

0.001 Low

EPSS

Percentile

22.7%