Commit 09d1d3a
authored
refactor: hostname matching allows subdomain bypass via ends_with (#1468)
The url_match() function uses `host.ends_with(entry.host())` to match hostnames.
This allows an attacker to bypass the allowlist: if "example.com" is allowed,
then "notexample.com", "evilexample.com", or "notexample.com.evil.com" would ALL match
because "notexample.com".ends_with("example.com") is true. This is a critical
security flaw in a runtime designed for Lambda/serverless workloads.
Affected files: security.rs
Signed-off-by: hieuit095 <139037144+hieuit095@users.noreply.github.com>1 parent 5f9674c commit 09d1d3a
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
0 commit comments