CVE-2025-27088: Github.com/oxyno zeta/s3 proxy/cmd/s3 proxy Cross-Site Scripting Vulnerability
HIGHCVE-2025-27088 is a HIGH cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/oxyno zeta/s3 proxy/cmd/s3 proxy libraries in the Go ecosystem. The issue involves s3-proxy allows reflected cross-site scripting (xss) in template implementation. Remediation is available by upgrading affected packages to version 0.0.0-20250220214310-c611c741ed48.
CVE-2025-27088 at a Glance
How to Fix CVE-2025-27088
To remediate this vulnerability, upgrade all affected Github.com/oxyno zeta/s3 proxy/cmd/s3 proxy dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy to 0.0.0-20250220214310-c611c741ed48
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-27088, inspect your project dependencies for Github.com/oxyno zeta/s3 proxy/cmd/s3 proxy:
inspect dependencies for github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy
Analyze the terminal output to locate any version of Github.com/oxyno zeta/s3 proxy/cmd/s3 proxy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20250220214310-c611c741ed48), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/oxyno zeta/s3 proxy/cmd/s3 proxy, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-27088 Affected Github.com/oxyno zeta/s3 proxy/cmd/s3 proxy Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy
|
Go |
< 0.0.0-20250220214310-c611c741ed48
|
0.0.0-20250220214310-c611c741ed48
|
References
Frequently Asked Questions
What is CVE-2025-27088?
Which Github.com/oxyno zeta/s3 proxy/cmd/s3 proxy versions are affected?
What version fixes CVE-2025-27088?
Is github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy affected?
What CWE is associated with CVE-2025-27088?
How can I check Go dependencies for CVE-2025-27088?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pp9m-qf39-hxjc",
"modified" : "2025-02-21T16:10:52Z",
"published" : "2025-02-20T22:18:46Z",
"aliases" : [ "CVE-2025-27088" ],
"summary" : "S3-Proxy allows Reflected Cross-site Scripting (XSS) in template implementation",
"details" : "### Summary\nA 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 high risk to all users.\n\n### Details\n_Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer._\nIt's possible to inject html elements, including scripts through the [folder-list template](https://github.com/oxyno-zeta/s3-proxy/blob/master/templates/folder-list.tpl#L19C21-L19C38). It seems like the `.Request.URL.Path` variable is not escaped.\n\nI did some research and found it might be due to the `text/template` import being used in [the template implementation](https://github.com/oxyno-zeta/s3-proxy/blob/master/pkg/s3-proxy/utils/templateutils/template.go#L8), instead of the [safer](https://pkg.go.dev/html/template) `html/template`.\n\n### PoC\n_Complete instructions, including specific configuration details, to reproduce the vulnerability._\nUsing the [default template configuration](https://oxyno-zeta.github.io/s3-proxy/configuration/structure/#targettemplateconfig), the vulnerability can be reproduced with the following steps.\n\n1. Navigate to `https://your-s3-proxy.com/path-not-found` and confirm the page looks as follows:\n\n\n2. Try inserting an HTML element by changing `/path-not-found` to `/<img src=\"x\">` and confirm the page looks as follows:\n\n\n3. Now it should be possible to run any JavaScript by manipulating the [`onerror` property of the img element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#image_loading_errors). This should make the link look like `https://your-s3-proxy.com/<img src=\"x\" onerror=\"alert(1)\">`. Confirm that going to this URL will in fact shows an alert in the browser.\n\n### Impact\nThe 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, leading to potential risks such as:\n- **Session Hijacking**: Malicious scripts could be used to steal session cookies or other sensitive information.\n- **Phishing Attacks**: JavaScript could be injected to trick users into submitting sensitive information, such as login credentials.\n\nThis vulnerability can be exploited by attackers who craft URLs containing malicious payloads, which would then execute in the user's browser when they access the affected page. This poses a **high** risk to all users who visit such URLs.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/oxyno-zeta/s3-proxy/cmd/s3-proxy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20250220214310-c611c741ed48"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.0.0-20250212215955-2873011f7c42"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/oxyno-zeta/s3-proxy/security/advisories/GHSA-pp9m-qf39-hxjc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-27088"
}, {
"type" : "WEB",
"url" : "https://github.com/oxyno-zeta/s3-proxy/commit/c611c741ed4872ea3f46232be23bb830f96f9564"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/oxyno-zeta/s3-proxy"
}, {
"type" : "WEB",
"url" : "https://github.com/oxyno-zeta/s3-proxy/blob/master/templates/folder-list.tpl#L19C21-L19C38"
}, {
"type" : "WEB",
"url" : "https://github.com/oxyno-zeta/s3-proxy/releases/tag/v4.18.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-02-20T22:18:46Z",
"nvd_published_at" : "2025-02-20T23:15:13Z"
}
}