# CVE-2020-36762: ONS Digital RAS Collection Instrument comment.yml jobs os command injection


- **Severity:** Medium 5.5 (`CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Fix available:** No
- **Published:** 18 Jul 2023
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-h9gr-83jq-f3xc

## What is CVE-2020-36762?

CVE-2020-36762 is a medium-severity vulnerability in ONS Digital RAS Collection Instrument, published on 18 Jul 2023. 

### Official description

A vulnerability was found in ONS Digital RAS Collection Instrument up to 2.0.27 and classified as critical. Affected by this issue is the function jobs of the file .github/workflows/comment.yml. The manipulation of the argument $COMMENT_BODY leads to os command injection. Upgrading to version 2.0.28 is able to address this issue. The name of the patch is dcaad2540f7d50c512ff2e031d3778dd9337db2b. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-234248.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2020-36762?

It affects 1 product.


Products: Ons Ras Collection Instrument.

## How do I fix CVE-2020-36762?

No fix has been published for CVE-2020-36762 yet. Limit exposure of the affected software until one is available.

## Is CVE-2020-36762 being exploited?

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

Public exploit code:

- Security-research lab reproducing CVE-2020-36762 (GHSA-h9gr-83jq-f3xc): bash command injection via github.event.comment.body in the comment workflow of ONSdigital/ras-collection-instrument (github_poc): https://github.com/pvharmo2/gha-lab-e4a85583c3

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-36762 and fix it if it is affected.

What it is: CVE-2020-36762 is a medium-severity vulnerability in ONS Digital RAS Collection Instrument, published on 18 Jul 2023. 
Exploitation: There is no known exploitation of CVE-2020-36762 in the wild and no public exploit code.

Affected product: ONS Digital RAS Collection Instrument. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-36762/ (Markdown: https://insights.sbomify.com/CVE-2020-36762/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-36762
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-36762
- OSV: https://osv.dev/vulnerability/CVE-2020-36762

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-36762/
Summaries are generated and may contain mistakes; the official description above is the record.
