GHSA-7r3h-m5j6-3q42

Suggest an improvement
Source
https://github.com/advisories/GHSA-7r3h-m5j6-3q42
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/08/GHSA-7r3h-m5j6-3q42/GHSA-7r3h-m5j6-3q42.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-7r3h-m5j6-3q42
Aliases
Related
Published
2022-08-18T19:01:36Z
Modified
2023-11-01T04:59:24.982288Z
Severity
  • 5.0 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:N CVSS Calculator
Summary
@actions/core has Delimiter Injection Vulnerability in exportVariable
Details

Impact

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.

Patches

Users should upgrade to @actions/core v1.9.1.

Workarounds

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.

References

More information about setting-an-environment-variable in workflows

If you have any questions or comments about this advisory: * Open an issue in actions/toolkit

Database specific
{
    "nvd_published_at": "2022-08-15T11:21:00Z",
    "github_reviewed_at": "2022-08-18T19:01:36Z",
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-74",
        "CWE-77"
    ]
}
References

Affected packages

npm / @actions/core

Package

Name
@actions/core
View open source insights on deps.dev
Purl
pkg:npm/%40actions/core

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.1

Database specific

{
    "last_known_affected_version_range": "<= 1.9.0"
}