{
  "id": "CVE-2025-31651",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-31651",
  "published_at": "2025-04-28T19:17:21.721Z",
  "title": "Apache Tomcat: Bypass of rules in Rewrite Valve",
  "vendor": "Apache Software Foundation",
  "product": "Apache Tomcat",
  "cvss": {
    "score": 9.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-03-09T02:33:16Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 314.3,
    "repo": "gregk4sec/CVE-2025-31651",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in Apache Tomcat. For a subset of unlikely rewrite rule configurations, it was possible \nfor a specially crafted request to bypass some rewrite rules. If those \nrewrite rules effectively enforced security constraints, those \nconstraints could be bypassed.\n\nThis issue affects Apache Tomcat: from 11.0.0-M1 through 11.0.5, from 10.1.0-M1 through 10.1.39, from 9.0.0.M1 through 9.0.102.\nThe following versions were EOL at the time the CVE was created but are \nknown to be affected: 8.5.0 though 8.5.100. Other, older, EOL versions \nmay also be affected.\n\n\nUsers are recommended to upgrade to version [FIXED_VERSION], which fixes the issue.",
  "cwe": "CWE-116",
  "cpes": [
    "cpe:2.3:a:apache:tomcat:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 9.8,
    "nvd": 9.8
  },
  "repos": [
    {
      "repo": "gregk4sec/CVE-2025-31651-o",
      "url": "https://github.com/gregk4sec/CVE-2025-31651-o",
      "created_at": "2025-04-08T06:24:01Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 2,
      "is_poc": "no",
      "kind": "writeup",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "owner account created less than 30 days before the repo"
      ],
      "status": "analyzed",
      "owner_created_at": "2025-03-13T17:35:11Z"
    },
    {
      "repo": "gregk4sec/CVE-2025-31651",
      "url": "https://github.com/gregk4sec/CVE-2025-31651",
      "created_at": "2026-03-09T02:33:16Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "listed by PoC Index",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2025-03-13T17:35:11Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Apache Software Foundation",
        "product": "Apache Tomcat",
        "ranges": [
          "\u003e= 11.0.0-M1, \u003c= 11.0.5",
          "\u003e= 10.1.0-M1, \u003c= 10.1.39",
          "\u003e= 9.0.0.M1, \u003c= 9.0.102",
          "\u003e= 8.5.0, \u003c= 8.5.100"
        ],
        "fixed_in": null
      },
      {
        "vendor": "",
        "product": "org.apache.tomcat:tomcat-catalina",
        "ranges": [
          "\u003e= 9.0.76, \u003c 9.0.104"
        ],
        "fixed_in": [
          "9.0.104"
        ],
        "ecosystem": "Maven",
        "advisory": "GHSA-ff77-26x5-69cr"
      },
      {
        "vendor": "",
        "product": "org.apache.tomcat:tomcat-catalina",
        "ranges": [
          "\u003e= 10.1.10, \u003c 10.1.40"
        ],
        "fixed_in": [
          "10.1.40"
        ],
        "ecosystem": "Maven",
        "advisory": "GHSA-ff77-26x5-69cr"
      },
      {
        "vendor": "",
        "product": "org.apache.tomcat:tomcat-catalina",
        "ranges": [
          "\u003e= 11.0.0-M2, \u003c 11.0.6"
        ],
        "fixed_in": [
          "11.0.6"
        ],
        "ecosystem": "Maven",
        "advisory": "GHSA-ff77-26x5-69cr"
      },
      {
        "vendor": "",
        "product": "org.apache.tomcat.embed:tomcat-embed-core",
        "ranges": [
          "\u003e= 9.0.76, \u003c 9.0.104"
        ],
        "fixed_in": [
          "9.0.104"
        ],
        "ecosystem": "Maven",
        "advisory": "GHSA-ff77-26x5-69cr"
      },
      {
        "vendor": "",
        "product": "org.apache.tomcat.embed:tomcat-embed-core",
        "ranges": [
          "\u003e= 10.1.10, \u003c 10.1.40"
        ],
        "fixed_in": [
          "10.1.40"
        ],
        "ecosystem": "Maven",
        "advisory": "GHSA-ff77-26x5-69cr"
      },
      {
        "vendor": "",
        "product": "org.apache.tomcat.embed:tomcat-embed-core",
        "ranges": [
          "\u003e= 11.0.0-M2, \u003c 11.0.6"
        ],
        "fixed_in": [
          "11.0.6"
        ],
        "ecosystem": "Maven",
        "advisory": "GHSA-ff77-26x5-69cr"
      },
      {
        "vendor": "",
        "product": "org.apache.tomcat:tomcat-catalina",
        "ranges": [
          "\u003e= 8.5.0, \u003c= 8.5.100"
        ],
        "fixed_in": null,
        "ecosystem": "Maven",
        "advisory": "GHSA-ff77-26x5-69cr"
      },
      {
        "vendor": "",
        "product": "org.apache.tomcat.embed:tomcat-embed-core",
        "ranges": [
          "\u003e= 8.5.0, \u003c= 8.5.100"
        ],
        "fixed_in": null,
        "ecosystem": "Maven",
        "advisory": "GHSA-ff77-26x5-69cr"
      }
    ],
    "upgrade": [
      "Upgrade org.apache.tomcat:tomcat-catalina to 9.0.104 or later.",
      "Upgrade org.apache.tomcat:tomcat-catalina to 10.1.40 or later.",
      "Upgrade org.apache.tomcat:tomcat-catalina to 11.0.6 or later.",
      "Upgrade org.apache.tomcat.embed:tomcat-embed-core to 9.0.104 or later.",
      "Upgrade org.apache.tomcat.embed:tomcat-embed-core to 10.1.40 or later.",
      "Upgrade org.apache.tomcat.embed:tomcat-embed-core to 11.0.6 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://lists.apache.org/list.html?announce@tomcat.apache.org"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [
    {
      "method": "GET",
      "path_template": "/sec/orders/housekeeper.jsp%3f",
      "ports": [
        8080
      ],
      "protocol": "http",
      "repos": [
        "gregk4sec/CVE-2025-31651"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "gregk4sec/CVE-2025-31651/analysis.md:29"
      ]
    }
  ],
  "rules": []
}
