Bug 1702348

Summary: js-yaml: Arbitrary Code Execution when using an object with an executable toString property
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ahardin, bleanhar, cbyrne, ccoleman, cmacedo, dedgar, dffrench, drusso, eparis, jgoulding, jmadigan, jokerman, jshepherd, mchappel, ngough, nodejs-sig, pwright, tchollingsworth, tjay, trepel
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: js-yaml 3.13.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-08 07:18:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1702349, 1702350    
Bug Blocks: 1702351    

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