CVE-2022-39326 kartverket/github-workflows's run-terraform allows for RCE via terraform plan

High 8.8 Published Updated

Attackers can execute arbitrary JavaScript code in GitHub Actions workflows via malicious pull requests using the run-terraform reusable workflow.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-39326?

CVE-2022-39326 is a high-severity code injection vulnerability in kartverket github-workflows, published on 25 Oct 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

kartverket/github-workflows are shared reusable workflows for GitHub Actions. Prior to version 2.7.5, all users of the `run-terraform` reusable workflow from the kartverket/github-workflows repo are affected by a code injection vulnerability. A malicious actor could potentially send a PR with a malicious payload leading to execution of arbitrary JavaScript code in the context of the workflow. Users should upgrade to at least version 2.7.5 to resolve the issue. As a workaround, review any pull requests from external users for malicious payloads before allowing them to trigger a build.

Weakness: CWE-94

Which versions are affected by CVE-2022-39326?

1 open source package ship an affected version, including kartverket/github-workflows. It affects 1 product.

PackageAffectedFixed in
kartverket/github-workflows GitHub ActionsAll versions2.7.5

Products include Kartverket Github-Workflows.

How do I fix CVE-2022-39326?

Upgrade kartverket/github-workflows to 2.7.5 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2022-39326 being exploited?

There is no known exploitation of CVE-2022-39326 in the wild and no public exploit code.

Sources

Also known as GHSA-f9qj-7gh3-mhj4.

Is CVE-2022-39326 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free