# CVE-2024-45036: Improper Access Control Vulnerability When Accessing a Maliciously Crafted Tophat Link

> Attackers can steal authentication tokens via malicious links, exposing internal mobile build artifacts to unauthorized access.

- **Severity:** Medium 4.3 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 26 Aug 2024
- **Updated:** 27 Aug 2024
- **Also known as:** GHSA-p7xh-6hjr-mmg6

## What is CVE-2024-45036?

CVE-2024-45036 is a medium-severity vulnerability in Shopify tophat, published on 26 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Tophat is a mobile applications testing harness. An Improper Access Control vulnerability can expose the `TOPHAT_APP_TOKEN` token stored in `~/.tophatrc` through use of a malicious Tophat URL controlled by the attacker. The vulnerability allows Tophat to send this token to the attacker's server without any checks to ensure that the server is trusted. This token can then be used to access internal build artifacts, for mobile applications, not intended to be public. The issue has been patched as of version 1.10.0.  The ability to request artifacts using a Tophat API has been deprecated as this flow was inherently insecure.  Systems that have implemented this kind of endpoint should cease use and invalidate the token immediately. There are no workarounds and all users should update as soon as possible.

Weakness: CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2024-45036?


## How do I fix CVE-2024-45036?

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

## Is CVE-2024-45036 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-45036 and fix it if it is affected.

What it is: CVE-2024-45036 is a medium-severity vulnerability in Shopify tophat, published on 26 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-45036 in the wild and no public exploit code.

Affected product: Shopify tophat. 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-2024-45036/ (Markdown: https://insights.sbomify.com/CVE-2024-45036/index.md)
```

## Sources

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

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