# GHSA-3wxm-m9m4-cprj: Import of incorrectly embargoed keys could cause early publication

> Importing keys from non-compliant servers allows early publication and potential replay of Random Proximity Identifiers, impacting privacy.

- **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:** 21 May 2021
- **Also known as:** GO-2022-0381

## What is GHSA-3wxm-m9m4-cprj?

GHSA-3wxm-m9m4-cprj is a vulnerability in github.com/google/exposure-notifications-server, published on 21 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

If your installation is using the `export-importer` service, there is potential impact.
If your installation is not importing keys via the `export-importer` services, your installation is not impacted.

In versions `0.19.1` and earlier, the `export-importer` service assumed that the server it was importing from had properly embargoed keys for at least 2 hours after their expiry time. There are now known instances of servers that did not properly embargo keys.

This could allow allow for imported keys to be re-published before they have expired, allowing for potential replay of RPIs.

### Patches

This is patched in `v0.18.3` and all versions `0.19.2` and later.

### Workarounds

Ensure that the servers you are importing export zip files from are not publishing keys too early. 

### References

n/a

### For more information

If you have any questions or comments about this advisory
* Open an issue in [exposure-notifications-server](https://github.com/google/exposure-notifications-server/)
* Email us at [exposure-notifications-feedback@google.com](mailto:exposure-notifications-feedback@google.com)

## Which versions are affected by GHSA-3wxm-m9m4-cprj?

5 open source packages ship an affected version, including github.com/google/exposure-notifications-server.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/google/exposure-notifications-server` | Go | All versions | 0.18.3, 0.19.2 |
| `github.com/google/exposure-notifications-server` | Go | All versions | 0.18.3 |
| `github.com/google/exposure-notifications-server` | Go | All versions | 0.18.3 |
| `github.com/google/exposure-notifications-server` | Go | From 0.19.0 | 0.19.2 |
| `github.com/google/exposure-notifications-server` | Go | From 0.19.0 | 0.19.2 |

## How do I fix GHSA-3wxm-m9m4-cprj?

Upgrade github.com/google/exposure-notifications-server to a fixed version for your release line: 0.18.3 or 0.19.2.

## Is GHSA-3wxm-m9m4-cprj being exploited?

There is no known exploitation of GHSA-3wxm-m9m4-cprj in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-3wxm-m9m4-cprj and fix it if it is affected.

What it is: GHSA-3wxm-m9m4-cprj is a vulnerability in github.com/google/exposure-notifications-server, published on 21 May 2021. 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-3wxm-m9m4-cprj in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/google/exposure-notifications-server (Go): affected all versions; fixed in 0.18.3, 0.19.2
- github.com/google/exposure-notifications-server (Go): affected all versions; fixed in 0.18.3
- github.com/google/exposure-notifications-server (Go): affected all versions; fixed in 0.18.3
- github.com/google/exposure-notifications-server (Go): affected from 0.19.0; fixed in 0.19.2
- github.com/google/exposure-notifications-server (Go): affected from 0.19.0; fixed in 0.19.2

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-3wxm-m9m4-cprj/ (Markdown: https://insights.sbomify.com/GHSA-3wxm-m9m4-cprj/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-3wxm-m9m4-cprj

---
From sbomify Insights: https://insights.sbomify.com/GHSA-3wxm-m9m4-cprj/
Summaries are generated and may contain mistakes; the official description above is the record.
