# CVE-2022-30321: Path traversal in n/a

> Attackers can exploit path traversal and command injection flaws in go-getter to access arbitrary hosts and execute code.

- **Severity:** High 8.6 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 May 2022
- **Updated:** 3 Aug 2024
- **Also known as:** DEBIAN-CVE-2022-30321, MINI-26rv-w23r-qvxv, MINI-2cg4-mjmx-87qr, MINI-2cpr-9h46-95h8, MINI-2pw9-62h4-fw6v, MINI-2qfm-q3w3-4g67, MINI-2v95-9pq4-7f8m, MINI-354p-7p9j-2w9m, MINI-3fr3-wgmf-7h6f, MINI-3frr-53j7-7vhj, MINI-3hvv-5mwv-7cjw, MINI-3m55-frmq-r59c, MINI-3rgv-6r9v-5fc3, MINI-3rxw-pf92-3qjm, MINI-3w9r-mwmw-2xf5, MINI-3wvm-wv96-qrj6, MINI-42cv-8gpf-xhpx, MINI-42xm-763g-vp24, MINI-4353-933p-x796, MINI-445g-qv9j-p8hf, MINI-495v-h355-pf9v, MINI-4qxm-84w2-x8p9, MINI-4v8w-q89q-9gr8, MINI-5382-89x6-qjm6, MINI-5c79-qwqm-j87c, MINI-5f84-jqpm-5cmj, MINI-5jr3-77q7-vr45, MINI-5rrx-fp7q-5mvf, MINI-6f7v-p6c4-885r, MINI-6g2g-q87v-hmrj, MINI-6j8g-6rpj-mq93, MINI-6p3c-8j9g-w3wj, MINI-73gr-6wx2-m74g, MINI-797h-mw63-7p4v, MINI-79qp-fv42-35p4, MINI-7c77-fcgh-9fhj, MINI-7gj3-p488-j8wj, MINI-7jwm-6xqp-965j, MINI-7mq3-ghq4-375p, MINI-7rfq-9997-wm94, MINI-8336-jph9-w72p, MINI-85g2-683c-2jpf, MINI-94mx-5mjg-f6v9, MINI-99j2-6p9w-qg2p, MINI-99j8-p3v9-xgpf, MINI-9c42-g77h-7w9q, MINI-9g78-cmpj-jp47, MINI-9mcq-xf64-j7xm, MINI-9q94-vvvv-j237, MINI-c6m7-cm28-rj36, MINI-c89r-4m4c-6xrc, MINI-cch6-w3wq-855x, MINI-cr47-vhr3-x578, MINI-cv7q-jj34-xf3p, MINI-f2xr-c2qq-5xj2, MINI-f493-j72q-v2x6, MINI-fgf5-pghq-f972, MINI-fgxw-g774-qrh2, MINI-fm4g-fchx-948j, MINI-fw8w-748h-6gxg, MINI-g354-jq6g-mrrh, MINI-gc59-54vj-4vqg, MINI-h2cc-mf5q-wg5f, MINI-h34w-hg68-5xff, MINI-h7c6-2rxc-86c3, MINI-h97g-6fhv-cgm7, MINI-hcpm-hq4c-44xj, MINI-hhpg-rxx2-wxjv, MINI-hj75-6g47-355j, MINI-hjm3-2p89-6p7r, MINI-hjqx-7cvf-g2q6, MINI-hm75-33x5-gqx5, MINI-j7m4-x9wf-fh52, MINI-jfp4-3487-r428, MINI-jrxq-c6fp-7pjf, MINI-jxhw-v6gf-mm72, MINI-jxxq-m3g4-fjr6, MINI-m5gr-2q65-x7fw, MINI-m7w6-wm4j-vf7j, MINI-m7x3-xm9p-wc58, MINI-mcjx-pfx9-xjx8, MINI-mfmv-2x5w-rcj7, MINI-mjj9-878w-j9gm, MINI-mvcr-rvp8-3jp9, MINI-mx5x-79p9-wm9c, MINI-mxjg-6v3m-3xv6, MINI-p6qm-v9cm-226f, MINI-pph2-v5hc-cqx8, MINI-q7mm-gwch-gf95, MINI-qcg5-ppgv-3vxx, MINI-qfg5-pxxm-8mh8, MINI-qvf8-xq32-67vh, MINI-r32q-77h4-5vm9, MINI-rc6q-376c-qp34, MINI-rh6r-m8jj-vwm7, MINI-rwvm-f9g3-gq27, MINI-v355-g864-p8mf, MINI-v4jj-j755-v9r8, MINI-vc5p-8f83-j74j, MINI-vg7g-x4hf-qrcp, MINI-vjq4-hwc7-pf68, MINI-vmff-97h8-489f, MINI-vqgf-c4ph-8jp9, MINI-vrg9-qj2q-799m, MINI-vvhw-2c33-rwmg, MINI-vvq7-5jcr-vg49, MINI-vw7w-5m7j-845r, MINI-vwpf-rp7c-2x3x, MINI-wcrx-2hg9-vhf7, MINI-wrq4-255q-9qwp, MINI-wvrx-vvv7-86rr, MINI-x2vg-57m6-mxmr, MINI-x493-jp27-g5j3, MINI-x4w8-486x-fxj5, MINI-x9qx-5x33-fqjg, MINI-xgc9-7ccv-qcr4, MINI-xjr7-7jmp-j4gh, MINI-xr3q-6mw6-34m5, UBUNTU-CVE-2022-30321

## What is CVE-2022-30321?

CVE-2022-30321 is a high-severity path traversal vulnerability in n/a, published on 25 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

go-getter up to 1.5.11 and 2.0.2 allowed arbitrary host access via go-getter path traversal, symlink processing, and command injection flaws. Fixed in 1.6.1 and 2.1.0.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command), CWE-59 (Improper Link Resolution Before File Access), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2022-30321?

It affects 1 product.


Products: Hashicorp Go-Getter.

## How do I fix CVE-2022-30321?

Upgrade to a fixed version.

## Is CVE-2022-30321 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2024-3817](https://insights.sbomify.com/CVE-2024-3817/): HashiCorp go-getter Vulnerable to Argument Injection When Fetching Remote Default Git Branches (critical 9.8)
- [CVE-2022-26945](https://insights.sbomify.com/CVE-2022-26945/): Server-side request forgery in n/a (critical 9.8)
- [CVE-2022-30322](https://insights.sbomify.com/CVE-2022-30322/): Denial of service in n/a (high 8.6)
- [CVE-2022-30323](https://insights.sbomify.com/CVE-2022-30323/): Denial of service in n/a (high 8.6)
- [CVE-2024-6257](https://insights.sbomify.com/CVE-2024-6257/): HashiCorp go-getter Vulnerable to Code Execution On Git Update Via Git Config Manipulation (high 8.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-30321 and fix it if it is affected.

What it is: CVE-2022-30321 is a high-severity path traversal vulnerability in n/a, published on 25 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-30321 in the wild and no public exploit code.

Affected product: n/a. 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-2022-30321/ (Markdown: https://insights.sbomify.com/CVE-2022-30321/index.md)
```

## Sources

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

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