GHSA-w9mr-28mw-j8hg: Github.com/ory/oathkeeper Hop-by-hop Abuse To Malform Header Vulnerability
LOWGHSA-w9mr-28mw-j8hg is a LOW hop-by-hop abuse to malform header vulnerability (General Security Weakness) affecting Github.com/ory/oathkeeper libraries in the Go ecosystem. The issue involves hop-by-hop abuse to malform header mutator. Remediation is available by upgrading affected packages to version 0.40.3.
GHSA-w9mr-28mw-j8hg at a Glance
How to Fix GHSA-w9mr-28mw-j8hg
To remediate this vulnerability, upgrade all affected Github.com/ory/oathkeeper dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/ory/oathkeeper to 0.40.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ory/oathkeeper
How to Check if You Are Affected
To determine whether your application is affected by GHSA-w9mr-28mw-j8hg, inspect your project dependencies for Github.com/ory/oathkeeper:
inspect dependencies for github.com/ory/oathkeeper
Analyze the terminal output to locate any version of Github.com/ory/oathkeeper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.40.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Github.com/ory/oathkeeper, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-w9mr-28mw-j8hg Affected Github.com/ory/oathkeeper Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ory/oathkeeper
|
Go |
< 0.40.3
|
0.40.3
|
References
Frequently Asked Questions
What is GHSA-w9mr-28mw-j8hg?
Which Github.com/ory/oathkeeper versions are affected?
What version fixes GHSA-w9mr-28mw-j8hg?
Is github.com/ory/oathkeeper affected?
What CWE is associated with GHSA-w9mr-28mw-j8hg?
How can I check Go dependencies for GHSA-w9mr-28mw-j8hg?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w9mr-28mw-j8hg",
"modified" : "2023-04-27T15:52:24Z",
"published" : "2023-04-26T19:44:00Z",
"aliases" : [ ],
"summary" : "Hop-by-hop abuse to malform header mutator",
"details" : "### Impact\n\nDownstream 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:\n\n```yaml\n- id: 'example'\n upstream:\n url: 'https://example.com'\n match:\n url: 'http://127.0.0.1:4455/'\n methods:\n - GET\n authenticators:\n - handler: anonymous\n authorizer:\n handler: allow\n mutators:\n - handler: header\n config:\n headers:\n X-Subject: {{ .Subject }}\n```\n\n```\ncurl -H \"Connection: close,x-subject\" http://127.0.0.1:4455/\n```\n\nThe `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.\n\n### Patches\n\nc5cc7f736dc84185034be4356057d1c7a656d797\n\n### Workarounds\n\nThe downstream server should handle the case that an expected header is not set by responding with an appropriate error.\n\n### References\n\nSee background info in https://github.com/golang/go/issues/50580",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ory/oathkeeper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.40.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ory/oathkeeper/security/advisories/GHSA-w9mr-28mw-j8hg"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ory/oathkeeper"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-04-26T19:44:00Z",
"nvd_published_at" : null
}
}