Repository navigation
Description
Summary
The CrowdSec Traefik access log parser fails to parse valid Traefik access log entries when the backend server URL uses the h2c:// scheme. Replacing h2c:// with http:// in an otherwise identical log line results in successful parsing.
This appears to be a parser compatibility issue with Traefik access logs for services using cleartext HTTP/2 (h2c).
Environment
- CrowdSec image:
crowdsecurity/crowdsec:v1.7.8 - Traefik:
v3.7.13 - Parser:
crowdsecurity/traefik-logsversion1.5, up to date - Traefik access log format: CLF
- NetBird service routed through Traefik using an h2c backend
- CrowdSec and Traefik share the
traefik-logsDocker volume
Example access log entry
The following line is taken from the Traefik access log:
192.168.192.1 - - [27/Oct/2026:19:05:09 +0000] "POST /signalexchange.SignalExchange/Send HTTP/2.0" 200 5 "-" "-" 7520 "netbird-grpc@docker" "h2c://172.18.0.11:80" 0ms
The request is a successful HTTP/2 request to the NetBird signal exchange service. Traefik records the backend URL as h2c://172.18.0.11:80.
Expected behavior
The parser should successfully parse this valid Traefik access log entry, including the request metadata and backend URL, so that the event can continue through CrowdSec's normal parsing and enrichment stages.
Actual behavior
Running:
docker exec crowdsec cscli explain \
--file /tmp/netbird-original.log \
--type traefikwith the original log line produces:
s01-parse
...
🔴 crowdsecurity/traefik-logs
-------- parser failure
The same line, with only the backend URL changed from h2c://172.18.0.11:80 to http://172.18.0.11:80, parses successfully:
s01-parse
...
🟢 crowdsecurity/traefik-logs (+27 ~2)
...
parser success, ignored by whitelist (private ipv4/ipv6 ip/ranges)
A separate Dockhand access log entry using a conventional http:// backend URL also parses successfully with the same parser.
Relevant parser definition
The installed parser defines:
pattern_syntax:
TRAEFIK_SERVER_URL: '(%{URI}|\-)'The main CLF parsing pattern includes:
pattern: '%{NGINXACCESS2} %{NUMBER:number_of_requests_received_since_traefik_started} "%{DATA:traefik_router_name}" "%{TRAEFIK_SERVER_URL:traefik_server_url}" %{NUMBER:request_duration_in_ms}ms'The failure appears to be associated with the TRAEFIK_SERVER_URL field. The exact underlying cause has not yet been confirmed.
Impact
- Access log lines for requests routed to h2c backends are reported as unparsed by the Traefik parser.
- Such lines may therefore miss the normal parsing and enrichment performed by CrowdSec.
- The observed test line originates from a private IP address and is subsequently whitelisted when parsing succeeds. This whitelist behavior is separate from the parser failure.
- No conclusion has been established that this issue causes missed detections in any particular attack scenario.
Reproduction steps
- Configure Traefik to route requests to a backend using the
h2c://scheme. - Capture a CLF access log entry containing that backend URL.
- Run
cscli explain --file <sample-file> --type traefikagainst the original line. - Change only the backend URL scheme from
h2c://tohttp://in a copy of the sample line. - Run the same parser diagnostic against the modified line.
- Observe that the original line fails parsing while the modified line parses successfully.
Question
Should the crowdsecurity/traefik-logs parser explicitly support h2c:// backend URLs? If so, could the TRAEFIK_SERVER_URL pattern be updated to accept this scheme?
The issue is reproducible with the installed parser, but the precise reason the current %{URI} pattern rejects the original line has not been independently established.
(supported by ChatGPT)
/kind enhancement
Activity
github-actions commentedon Oct 28, 2026
@comchk: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
github-actions commentedon Oct 28, 2026
@comchk: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.
/kind feature/kind enhancement/kind refactoring/kind bug/kind packagingDetails
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
Support h2c and RFC 3986 backend URL schemes in traefik-logs (crowdse…
Support h2c and RFC 3986 backend URL schemes in traefik-logs (#1966) (#…