Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/ory/oathkeeper
  4. ›
  5. GMS-2023-1202

GMS-2023-1202: Hop-by-hop abuse to malform header mutator

April 26, 2023

Impact

Downstream services relying on the presence of headers set by the header mutator could be exploited. A client can drop the header set by the header mutator by including that header’s name in the Connection header. Example minimal config:

- id: 'example'
 upstream:
  url: 'https://example.com'
 match:
  url: 'http://127.0.0.1:4455/'
  methods:
   - GET
 authenticators:
  - handler: anonymous
 authorizer:
  handler: allow
 mutators:
  - handler: header
   config:
    headers:
     X-Subject: {{ .Subject }}
curl -H "Connection: x-subject" http://127.0.0.1:4455/

The X-Subject header will not arrive at the downstream server. It is completely dropped. In case the downstream server handles such a request in an unexpected way, an attacker can exploit this, assuming they know or guess the internal header name.

Patches

c5cc7f736dc84185034be4356057d1c7a656d797

Workarounds

The downstream server should handle the case that an expected header is not set by responding with an appropriate error.

References

See background info in https://github.com/golang/go/issues/50580

References

  • github.com/advisories/GHSA-w9mr-28mw-j8hg
  • github.com/ory/oathkeeper/security/advisories/GHSA-w9mr-28mw-j8hg

Code Behaviors & Features

Detect and mitigate GMS-2023-1202 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.40.3

Fixed versions

  • 0.40.3

Solution

Upgrade to version 0.40.3 or above.

Source file

go/github.com/ory/oathkeeper/GMS-2023-1202.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:13 +0000.