# GHSA-r2r8-36pq-27cm: nzo/url-encryptor-bundle Insecure default secret key and IV allowing anyone to decrypt values

> An attacker can decrypt and modify encrypted data due to insecure default cryptographic settings in the URL encryptor bundle.

- **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:** 17 May 2024

## What is GHSA-r2r8-36pq-27cm?

GHSA-r2r8-36pq-27cm is a vulnerability in nzo/url-encryptor-bundle, published on 17 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Versions of nzo/url-encryptor-bundle prior to 5.0.1 and 4.3.2 are affected by a security vulnerability related to the lack of mandatory key and IV requirements. By default, the bundle uses the aes-256-ctr algorithm, which is susceptible to malleability attacks, potentially leading to Insecure Direct Object Reference (IDOR) vulnerabilities. Additionally, the reuse of keys enables users to decrypt and modify encrypted data if they can guess the plaintext of one ciphertext.

## Which versions are affected by GHSA-r2r8-36pq-27cm?

4 open source packages ship an affected version, including nzo/url-encryptor-bundle.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `nzo/url-encryptor-bundle` | Packagist | From 4.0.0 | 4.3.2 |
| `nzo/url-encryptor-bundle` | Packagist | From 4.0.0 | 4.3.2 |
| `nzo/url-encryptor-bundle` | Packagist | From 5.0.0 | 5.0.1 |
| `nzo/url-encryptor-bundle` | Packagist | From 5.0.0 | 5.0.1 |

## How do I fix GHSA-r2r8-36pq-27cm?

Upgrade nzo/url-encryptor-bundle to a fixed version for your release line: 4.3.2 or 5.0.1.

## Is GHSA-r2r8-36pq-27cm being exploited?

There is no known exploitation of GHSA-r2r8-36pq-27cm in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-r2r8-36pq-27cm and fix it if it is affected.

What it is: GHSA-r2r8-36pq-27cm is a vulnerability in nzo/url-encryptor-bundle, published on 17 May 2024. 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-r2r8-36pq-27cm in the wild and no public exploit code.

Affected packages and fixed versions:
- nzo/url-encryptor-bundle (Packagist): affected from 4.0.0; fixed in 4.3.2
- nzo/url-encryptor-bundle (Packagist): affected from 4.0.0; fixed in 4.3.2
- nzo/url-encryptor-bundle (Packagist): affected from 5.0.0; fixed in 5.0.1
- nzo/url-encryptor-bundle (Packagist): affected from 5.0.0; fixed in 5.0.1

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-r2r8-36pq-27cm/ (Markdown: https://insights.sbomify.com/GHSA-r2r8-36pq-27cm/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-r2r8-36pq-27cm

---
From sbomify Insights: https://insights.sbomify.com/GHSA-r2r8-36pq-27cm/
Summaries are generated and may contain mistakes; the official description above is the record.
