# CVE-2025-27088: Reflected Cross-site Scripting (XSS) in template implementation in oxyno-zeta/s3-proxy

> Attackers can inject malicious scripts via crafted URLs in the folder-list template, leading to session hijacking or phishing on the trusted domain.

- **Severity:** High 8.4 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:H/SA: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:** Yes
- **Published:** 20 Feb 2025
- **Updated:** 21 Feb 2025
- **Also known as:** GHSA-pp9m-qf39-hxjc, GO-2025-3477

## What is CVE-2025-27088?

CVE-2025-27088 is a high-severity cross-site scripting vulnerability in oxyno-zeta s3-proxy, published on 20 Feb 2025. 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

oxyno-zeta/s3-proxy is an aws s3 proxy written in go. In affected versions a Reflected Cross-site Scripting (XSS) vulnerability enables attackers to create malicious URLs that, when visited, inject scripts into the web application. This can lead to session hijacking or phishing attacks on a trusted domain, posing a moderate risk to all users. It's possible to inject html elements, including scripts through the folder-list template. The affected template allows users to interact with the URL path provided by the `Request.URL.Path` variable, which is then rendered directly into the HTML without proper sanitization or escaping. This can be abused by attackers who craft a malicious URL containing injected HTML or JavaScript. When users visit such a URL, the malicious script will be executed in the user's context. This issue has been addressed in version 4.18.1 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2025-27088?

3 open source packages ship an affected version, including github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy and github.com/oxyno-zeta/s3-proxy. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy` | Go | All versions | 0.0.0-20250220214310-c611c741ed48 |
| `github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy` | Go | All versions | 0.0.0-20250220214310-c611c741ed48 |
| `github.com/oxyno-zeta/s3-proxy` | Go | All versions | 0.0.0-20250220214310-c611c741ed48 |

Products: Oxyno-Zeta S3-Proxy.

## How do I fix CVE-2025-27088?

Upgrade github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy to 0.0.0-20250220214310-c611c741ed48 or later.

## Is CVE-2025-27088 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27088 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-27088 and fix it if it is affected.

What it is: CVE-2025-27088 is a high-severity cross-site scripting vulnerability in oxyno-zeta s3-proxy, published on 20 Feb 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27088 exists.

Affected packages and fixed versions:
- github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy (Go): affected all versions; fixed in 0.0.0-20250220214310-c611c741ed48
- github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy (Go): affected all versions; fixed in 0.0.0-20250220214310-c611c741ed48
- github.com/oxyno-zeta/s3-proxy (Go): affected all versions; fixed in 0.0.0-20250220214310-c611c741ed48

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

## Sources

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

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