CVE-2020-15092: @knight lab/timelinejs Cross-Site Scripting Vulnerability
HIGHCVE-2020-15092 is a HIGH (CVSS 7.2) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @knight lab/timelinejs libraries in the npm ecosystem. The issue involves stored xss in timelinejs3. Remediation is available by upgrading affected packages to version 3.7.0.
CVE-2020-15092 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-15092
To remediate this vulnerability, upgrade all affected @knight lab/timelinejs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @knight-lab/timelinejs@3.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @knight-lab/timelinejs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-15092, inspect your project dependencies using npm:
npm ls @knight-lab/timelinejs
Analyze the terminal output to locate any version of @knight lab/timelinejs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.7.0), your application is affected.
Note: The npm ls @knight-lab/timelinejs 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 @knight lab/timelinejs, 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
CVE-2020-15092 Affected @knight lab/timelinejs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@knight-lab/timelinejs
|
npm |
< 3.7.0
|
3.7.0
|
References
Frequently Asked Questions
What is CVE-2020-15092?
Which @knight lab/timelinejs versions are affected?
What version fixes CVE-2020-15092?
Is @knight-lab/timelinejs affected?
What is the CVSS score of CVE-2020-15092?
What CWE is associated with CVE-2020-15092?
How can I check npm dependencies for CVE-2020-15092?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2jpm-827p-j44g",
"modified" : "2021-01-07T23:47:19Z",
"published" : "2020-07-09T18:28:07Z",
"aliases" : [ "CVE-2020-15092" ],
"summary" : "Stored XSS in TimelineJS3",
"details" : "### Impact\nTimelineJS 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.\n\nMost 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.\n\nSome 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.\n\nAlthough the vulnerability has a [CVSS v3.1 base score of 7.2](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H), this vulnerability has a severity of Moderate due to the likeliness of exploitation.\n\n### Patches\nVersion 3.7.0 of TimelineJS addresses this in two ways. \n\n1. For content which is intended to support limited HTML markup for styling and linking, that content is \"sanitized\" before being added to the DOM.\n1. For content intended for simple text display, all markup is stripped. \n\nVery 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.\n\nSome users of TimelineJS use it as a part of a [wordpress plugin](https://wordpress.org/plugins/knight-lab-timelinejs/). 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.\n\n### Workarounds\nTo exploit this vulnerability, the attacker must have write access to the data source for the Timeline or the server which embeds the timeline.\n\nThus, the only workaround is appropriate attention to securing write access to the Google Sheet or JSON file which serves as the data source.\n\n### References\nFor more about the release of TimelineJS which addresses this vulnerability, see the [Knight Lab website](https://knightlab.northwestern.edu/2020/07/09/timelinejs-update/index.html).\n\nA technical write-up of this vulnerability is available [here](https://zanderwork.com/blog/cve-2020-15092/).\n\n### Acknowledgements\n\nThis vulnerability was discovered by Zander Work ([@captainGeech42](https://twitter.com/captainGeech42)) of Oregon State University.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [GitHub](https://github.com/NUKnightLab/TimelineJS3/issues)\n* File a support request in our [helpdesk system](https://knightlab.zendesk.com/hc/en-us/requests/new)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@knight-lab/timelinejs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/NUKnightLab/TimelineJS3/security/advisories/GHSA-2jpm-827p-j44g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15092"
}, {
"type" : "WEB",
"url" : "https://knightlab.northwestern.edu/2020/07/09/timelinejs-update/index.html"
}, {
"type" : "WEB",
"url" : "https://knightlab.northwestern.edu/posts"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-07-09T18:27:39Z",
"nvd_published_at" : null
}
}