Bug 2118530 (CVE-2022-35954)

Summary: CVE-2022-35954 npm: Delimiter injection vulnerability in @actions/core exportVariable
Product: [Other] Security Response Reporter: Avinash Hanwate <ahanwate>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jnovy, lsm5, rh.container.bot, santiago
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: actions/core 1.9.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-18 10:11:28 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: 2118531, 2118532    
Bug Blocks:    

Description Avinash Hanwate 2022-08-16 04:17:19 UTC
The GitHub Actions ToolKit provides a set of packages to make creating actions easier. The `core.exportVariable` function uses a well known delimiter that attackers can use to break out of that specific variable and assign values to other arbitrary variables. Workflows that write untrusted values to the `GITHUB_ENV` file may cause the path or other environment variables to be modified without the intention of the workflow or action author. Users should upgrade to `@actions/core v1.9.1`. If you are unable to upgrade the `@actions/core` package, you can modify your action to ensure that any user input does not contain the delimiter `_GitHubActionsFileCommandDelimeter_` before calling `core.exportVariable`.

https://github.com/actions/toolkit/security/advisories/GHSA-7r3h-m5j6-3q42
https://github.com/actions/toolkit/commit/4beda9cbc00ba6eefe387a937c21087ccb8ee9df

Comment 1 Avinash Hanwate 2022-08-16 04:17:44 UTC
Created pack tracking bugs for this issue:

Affects: epel-all [bug 2118531]
Affects: fedora-all [bug 2118532]

Comment 2 Lokesh Mandvekar 2022-08-16 12:44:38 UTC
Hi Avinash,

I don't see this affecting the "pack" package because the rpms don't have anything to do with github actions. "core.exportVariable" and "actions/core" are only found in the ".github" directory for upstream pack repo which isn't used by the package.

Do let me know if you think otherwise.