owasp-modsecurity / owasp-modsecurity/ModSecurity

Matched \"Operator `Eq' with parameter `0' against variable `REQUEST_HEADERS:Host' (Value: `0' )

Open
#3,316 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.x
Dominant language
C++
Stars
9.8k
Forks
1.8k
Avg merge
2h 46m
Merged PRs (30d)
1

Description

ModSecurity does not recognize the Host header when using HTTP/3. I believe I have the correct versions of ModSecurity, the connector, and the rules. Is any custom configuration necessary to handle HTTP/3 requests?

{
  "transaction": {
    "client_ip": "XXXXXX",
    "time_stamp": "Wed Dec 18 15:52:34 2024",
    "server_id": "a53237e5ec8faf273b2ea40bcca024979fdaed7f",
    "client_port": 46779,
    "host_ip": "XXXXXX",
    "host_port": 443,
    "unique_id": "173453355437.118418",
    "request": {
      "method": "GET",
      "http_version": 3,
      "uri": "/",
      "headers": {
        "sec-fetch-user": "?1",
        "sec-ch-ua": "\"Chromium\";v=\"129\", \"Not=A?Brand\";v=\"8\"",
        "sec-fetch-dest": "document",
        "sec-fetch-mode": "navigate",
        "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
        "sec-fetch-site": "cross-site",
        "sec-ch-ua-platform": "\"Linux\"",
        "upgrade-insecure-requests": "1",
        "sec-ch-ua-mobile": "?0",
        "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "cache-control": "max-age=0",
        "accept-encoding": "gzip, deflate, br, zstd",
        "accept-language": "en-US,en;q=0.9",
        "priority": "u=0, i"
      }
    },
    "response": {
      "body": "",
      "http_code": 200,
      "headers": {
        "Server": "nginx/1.26.2",
        "Date": "Wed, 18 Dec 2024 14:52:34 GMT",
        "Content-Type": "application/octet-stream",
        "Connection": "keep-alive",
        "Alt-Svc": "h3=\":443\"; ma=86400"
      }
    },
    "producer": {
      "modsecurity": "ModSecurity v3.0.13 (Linux)",
      "connector": "ModSecurity-nginx v1.0.3",
      "secrules_engine": "DetectionOnly",
      "components": [
        "OWASP_CRS/4.9.0\""
      ]
    },
    "messages": [
      {
        "message": "Request Missing a Host Header",
        "details": {
          "match": "Matched \"Operator `Eq' with parameter `0' against variable `REQUEST_HEADERS:Host' (Value: `0' )",
          "reference": "",
          "ruleId": "920280",
          "file": "/usr/local/nginx/conf/crs4/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf",
          "lineNumber": "574",
          "data": "",
          "severity": "4",
          "ver": "OWASP_CRS/4.9.0",
          "rev": "",
          "tags": [
            "application-multi",
            "language-multi",
            "platform-multi",
            "attack-protocol",
            "paranoia-level/1",
            "OWASP_CRS",
            "capec/1000/210/272",
            "PCI/6.5.10"
          ],
          "maturity": "0",
          "accuracy": "0"
        }
      }
    ]
  }
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with rule 920280 at line 574 of REQUEST-920-PROTOCOL-ENFORCEMENT.conf and compare its REQUEST_HEADERS:Host match with the supplied HTTP/3 transaction. Then inspect the ModSecurity-nginx connector behavior for HTTP/3 requests. Done means determining whether custom configuration is required or documenting a confirmed connector or engine defect.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.