# GHSA-v78c-4p63-2j6c: Cleartext Transmission of Sensitive Information in moment-timezone

> An attacker can intercept unencrypted FTP requests during custom builds to inject malicious timezone data, potentially leading to code execution.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Aug 2022

## What is GHSA-v78c-4p63-2j6c?

GHSA-v78c-4p63-2j6c is a vulnerability in moment-timezone, published on 30 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

* if Alice uses `grunt data` (or `grunt release`) to prepare a custom-build, moment-timezone with the latest tzdata from IANA's website
* and Mallory intercepts the request to IANA's unencrypted ftp server, Mallory can serve data which might exploit further stages of the moment-timezone tzdata pipeline, or potentially produce a tainted version of moment-timezone (practicality of such attacks is not proved)

### Patches
Problem has been patched in version 0.5.35, patch should be applicable with minor modifications to all affected versions. The patch includes changing the FTP endpoint with an HTTPS endpoint.

### Workarounds
Specify the exact version of tzdata (like `2014d`, full command being `grunt data:2014d`, then run the rest of the release tasks by hand), or just apply the patch before issuing the grunt command.

## Which versions are affected by GHSA-v78c-4p63-2j6c?

2 open source packages ship an affected version, including moment-timezone.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `moment-timezone` | npm | From 0.1.0 | 0.5.35 |
| `moment-timezone` | npm | From 0.1.0 | 0.5.35 |

## How do I fix GHSA-v78c-4p63-2j6c?

Upgrade moment-timezone to 0.5.35 or later.

## Is GHSA-v78c-4p63-2j6c being exploited?

There is no known exploitation of GHSA-v78c-4p63-2j6c in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-v78c-4p63-2j6c and fix it if it is affected.

What it is: GHSA-v78c-4p63-2j6c is a vulnerability in moment-timezone, published on 30 Aug 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 GHSA-v78c-4p63-2j6c in the wild and no public exploit code.

Affected packages and fixed versions:
- moment-timezone (npm): affected from 0.1.0; fixed in 0.5.35
- moment-timezone (npm): affected from 0.1.0; fixed in 0.5.35

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/GHSA-v78c-4p63-2j6c/ (Markdown: https://insights.sbomify.com/GHSA-v78c-4p63-2j6c/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-v78c-4p63-2j6c

---
From sbomify Insights: https://insights.sbomify.com/GHSA-v78c-4p63-2j6c/
Summaries are generated and may contain mistakes; the official description above is the record.
