Feb 25, 2026·5 min read·66 visits
Caddy versions prior to 2.11.1 contain a critical logic flaw in how they handle path matching with percent-encoded sequences. By capitalizing parts of the URL, an attacker can bypass path-based restrictions, potentially accessing administrative panels or protected files that rely on Caddy for security.
A logic error in Caddy's HTTP path matching engine allows attackers to bypass access control lists (ACLs) by manipulating URL casing. When a configuration pattern involves percent-encoded characters, Caddy fails to normalize the incoming request path to lowercase before comparison. This oversight renders case-insensitive rules ineffective, effectively letting attackers walk past the bouncer simply by shouting their destination (e.g., requesting '/ADMIN' instead of '/admin').
Caddy is the darling of the modern web server ecosystem. It's written in Go, it handles TLS automatically, and it markets itself as 'secure by default.' We love it because it usually stops us from shooting ourselves in the foot. But even the sleekest, most memory-safe tools can trip over the oldest hurdle in computer science: string comparison.
In the world of reverse proxies, the path matcher is often the primary line of defense. You set up a rule: "Block everything starting with /admin." You assume the server is smart enough to know that /ADMIN, /Admin, and /aDmin are the same place. Usually, Caddy is that smart.
However, CVE-2026-27587 reveals a crack in that armor. It turns out that if you get fancy with your configuration—specifically by including percent-encoded characters (like %2f for a slash)—Caddy's brain short-circuits. It stops normalizing the input. It stops thinking. And suddenly, your carefully crafted access control list is about as effective as a 'Keep Out' sign written in invisible ink.
To understand this bug, you have to understand how Caddy optimizes matching. String comparison is expensive at scale, so Caddy tries to normalize everything upfront. When you provision the server, Caddy takes your configuration patterns (like /secret/*) and lowercases them. This way, when a request comes in, Caddy just lowercases the request and does a fast check.
But here's the catch: generic lowercasing destroys percent-encoding information. If you configured a rule for /api%2fv1 (implying a literal encoded slash), a standard lowercase operation might mangle the semantic meaning Caddy is trying to preserve.
So, the developers added a fork in the road. If the configuration pattern contains a % character, Caddy switches to a specialized function: matchPatternWithEscapeSequence. This function is supposed to handle the nuance of encoded characters.
The problem? In this specialized 'smart' branch, they forgot the basics. While the configuration pattern was already lowercased during the provisioning phase, the incoming request path was left raw. Caddy ends up comparing a lowercased rule against a raw, potentially mixed-case request. It's an apples-to-oranges comparison where the attacker controls the oranges.
Let's look at the diff. This is from modules/caddyhttp/matchers.go. It is almost painfully simple, which is characteristic of the most dangerous logic bugs.
The vulnerable function, matchPatternWithEscapeSequence, takes the escapedPath (from the request) and the matchPath (from the config). Remember, matchPath is already lowercase here.
Before the fix:
func (MatchPath) matchPatternWithEscapeSequence(escapedPath, matchPath string) bool {
// ... logic to handle wildcards ...
return strings.HasPrefix(escapedPath, matchPath)
}See the issue? escapedPath comes straight from the wire. If I send /ADMIN%2f, escapedPath is /ADMIN%2f. But matchPath is /admin%2f. "/ADMIN%2f" does not start with "/admin%2f" in a case-sensitive byte comparison.
The Fix (Commit a108119):
func (MatchPath) matchPatternWithEscapeSequence(escapedPath, matchPath string) bool {
+ escapedPath = strings.ToLower(escapedPath)
// We would just compare the pattern against r.URL.Path,
// but the pattern contains %, indicating that we should
// compare at least some part of the path in raw/escaped
// form. Matches are case-insensitive.
// ...
}It is a one-line fix. By forcefully lowercasing the request path at the start of the function, parity is restored. The attacker's /ADMIN%2f becomes /admin%2f, the match succeeds, and the ACL (hopefully) blocks the request.
Exploiting this requires two things: a Caddy server running a version older than 2.11.1, and a specific configuration anti-pattern.
First, we need a target configuration that looks something like this. Note the %2f in the path—this is the trigger that forces Caddy into the vulnerable code path:
{
"match": [{"path": ["/private%2fdata*"]}],
"handle": [{"handler": "authentication"}]
}In this scenario, the admin wants to protect anything under /private/data. Because they used %2f, Caddy treats this as a 'complex' match.
The Attack Chain:
GET /private%2fdata/passwords.txt. Caddy sees the match, triggers the authentication handler, and we get a 401 Unauthorized or a login redirect.GET /PRIVATE%2fdata/passwords.txt.% in the config pattern.matchPatternWithEscapeSequence./private%2fdata* vs request /PRIVATE%2fdata....authentication handler is skipped. The request falls through to the next handler—usually a file server or a reverse proxy to a backend app.If the backend app (e.g., a Python or Node.js service) handles routing case-insensitively (which most do) or normalizes the path itself, it will happily serve the content. We have successfully bypassed the auth layer.
The severity of this vulnerability depends entirely on how Caddy is being used. If Caddy is just a dumb pipe passing everything to a backend that does its own strict authentication, this is a non-issue.
However, the modern trend is 'Sidecar Security.' DevOps teams love to offload authentication (OIDC, Basic Auth, mTLS) to the edge proxy (Caddy). They assume that if Caddy says 'you shall not pass,' then nobody passes.
This vulnerability creates a normalization inconsistency. The security layer (Caddy) thinks the path is one thing (/PRIVATE... -> No Match -> Allowed), while the application layer thinks it is another (/PRIVATE... -> Normalize -> /private... -> Serve Resource). This mismatch allows unauthenticated users to access administrative panels, metrics endpoints, or sensitive file directories simply by holding down the Shift key.
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| Product | Affected Versions | Fixed Version |
|---|---|---|
Caddy Caddy | < 2.11.1 | 2.11.1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-178 |
| CVSS Score | 7.7 (High) |
| Attack Vector | Network |
| Vulnerability Type | Improper Handling of Case Sensitivity |
| Exploit Status | PoC Available (Trivial) |
| Patch Date | 2026-02-20 |
NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.
CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.
CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.
CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.
A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.
CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.