Bug 1702348 - js-yaml: Arbitrary Code Execution when using an object with an executable toString property
Summary: js-yaml: Arbitrary Code Execution when using an object with an executable toS...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1702349 1702350
Blocks: 1702351
TreeView+ depends on / blocked
 
Reported: 2019-04-23 14:38 UTC by Laura Pardo
Modified: 2021-02-16 22:04 UTC (History)
20 users (show)

Fixed In Version: js-yaml 3.13.1
Clone Of:
Environment:
Last Closed: 2019-08-08 07:18:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Laura Pardo 2019-04-23 14:38:29 UTC
A vulnerability was found in js-yaml before version 3.13.1. An Arbitrary Code Execution when an object with an executable toString() property is used as a map key, it will execute that function. This happens only for load(), which should not be used with untrusted data anyway.  safeLoad() is not affected because it can't parse functions.


References:
https://snyk.io/vuln/SNYK-JS-JSYAML-174129

Upstream Patch:
https://github.com/nodeca/js-yaml/pull/480

Comment 1 Laura Pardo 2019-04-23 14:38:52 UTC
Created nodejs-js-yaml tracking bugs for this issue:

Affects: epel-all [bug 1702349]
Affects: fedora-all [bug 1702350]

Comment 2 Sam Fowler 2019-05-01 04:17:15 UTC
Statement:

This vulnerability has been rated Moderate as it requires the use of js-yaml's load() function with untrusted input, which is known to be unsafe. Untrusted input should be parsed with js-yaml's safeLoad() function instead.

The kibana RPM shipped in OpenShift Container Platform (OCP), bundles the Node.js package js-yaml. The kibana RPM shipped in all versions of OCP is not affected by this vulnerability, as it uses safeLoad() instead of the vulnerable load() function.

The js-yaml RPM was shipped in OCP until it was removed in version 3.11. This RPM is not used by any container images in OCP.

Comment 3 Jason Shepherd 2019-08-08 04:41:09 UTC
This vulnerability is out of security support scope for the following product:

 * Red Hat Mobile Application Platform

 Please refer to https://access.redhat.com/support/policy/updates/rhmap for more details


Note You need to log in before you can comment on or make changes to this bug.