# CVE-2017-7549: instack-undercloud vulnerable to symlink attack on tmp files

> A local attacker can exploit insecure temporary files in instack-undercloud scripts to overwrite arbitrary files via symbolic link attacks.

- **Severity:** Medium 6.4 (`CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Sep 2017
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-53wm-97p6-582f, PYSEC-2017-152, PYSEC-2026-645, RHSA-2017:2557, RHSA-2017:2649, RHSA-2017:2687, RHSA-2017:2693, RHSA-2017:2726

## What is CVE-2017-7549?

CVE-2017-7549 is a medium-severity path traversal vulnerability in Red Hat, Inc. instack-undercloud, published on 21 Sep 2017. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A flaw was found in instack-undercloud 7.2.0 as packaged in Red Hat OpenStack Platform Pike, 6.1.0 as packaged in Red Hat OpenStack Platform Oacta, 5.3.0 as packaged in Red Hat OpenStack Newton, where pre-install and security policy scripts used insecure temporary files. A local user could exploit this flaw to conduct a symbolic-link attack, allowing them to overwrite the contents of arbitrary files.

Weakness: CWE-59 (Improper Link Resolution Before File Access), CWE-377 (DEPRECATED: Insecure Temporary File)

## Which versions are affected by CVE-2017-7549?

4 open source packages ship an affected version, including instack-undercloud and instack. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `instack-undercloud` | PyPI | All versions to 7.2.0 | None |
| `instack-undercloud` | PyPI | All versions to 7.2.0 | None |
| `instack-undercloud` | PyPI | All versions to 7.2.0 | None |
| `instack` | PyPI | All versions to 7.2.0 | None |
| `instack-undercloud` | Red Hat:openstack-director:7::el7 | All versions | 0:2.1.2-41.el7ost |
| `instack-undercloud` | Red Hat:openstack-director:8::el7 | All versions | 0:2.2.7-10.el7ost |
| `instack-undercloud` | Red Hat:openstack-director:9::el7 | All versions | 0:4.0.0-17.el7ost |
| `instack-undercloud` | Red Hat:openstack:10::el7 | All versions | 0:5.3.0-3.el7ost |
| `instack-undercloud` | Red Hat:openstack:11::el7 | All versions | 0:6.1.0-3.el7ost |

Products: Openstack Instack-Undercloud.

## How do I fix CVE-2017-7549?

Apply the vendor's patch.

## Is CVE-2017-7549 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-7549 and fix it if it is affected.

What it is: CVE-2017-7549 is a medium-severity path traversal vulnerability in Red Hat, Inc. instack-undercloud, published on 21 Sep 2017. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2017-7549 in the wild and no public exploit code.

Affected packages and fixed versions:
- instack-undercloud (PyPI): affected all versions up to 7.2.0; no fix listed
- instack-undercloud (PyPI): affected all versions up to 7.2.0; no fix listed
- instack-undercloud (PyPI): affected all versions up to 7.2.0; no fix listed
- instack (PyPI): affected all versions up to 7.2.0; no fix listed

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-2017-7549/ (Markdown: https://insights.sbomify.com/CVE-2017-7549/index.md)
```

## Sources

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

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