{"answers":{"affected":"3 open source packages ship an affected version, including github.com/ory/oathkeeper.","exploited":"There is no known exploitation of GHSA-w9mr-28mw-j8hg in the wild and no public exploit code.","fix":"Upgrade github.com/ory/oathkeeper to 0.40.3 or later.","what":"GHSA-w9mr-28mw-j8hg is a vulnerability in github.com/ory/oathkeeper, published on 26 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-w9mr-28mw-j8hg and fix it if it is affected.\n\nWhat it is: GHSA-w9mr-28mw-j8hg is a vulnerability in github.com/ory/oathkeeper, published on 26 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-w9mr-28mw-j8hg in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/ory/oathkeeper (Go): affected all versions; fixed in 0.40.3\n- github.com/ory/oathkeeper (Go): affected all versions; fixed in 0.40.3\n- github.com/ory/oathkeeper (Go): affected all versions; fixed in 0.40.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-w9mr-28mw-j8hg/ (Markdown: https://insights.sbomify.com/GHSA-w9mr-28mw-j8hg/index.md)","id":"GHSA-w9mr-28mw-j8hg","markdown":"https://insights.sbomify.com/GHSA-w9mr-28mw-j8hg/index.md","name":"GHSA-w9mr-28mw-j8hg","record":{"aliases":["GO-2023-1747"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Go API Gateway","requires_auth":"none","summary":"Attackers can bypass header-based authentication or authorization by dropping headers via Connection header manipulation in Go-based gateways.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Hop-by-hop abuse to malform header mutator","id":"GHSA-w9mr-28mw-j8hg","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"security_feature_bypass","year":"2023"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.40.3"],"introduced":["0"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":null,"source":"GHSA-w9mr-28mw-j8hg"},{"ecosystem":"Go","fixed":["0.40.3"],"introduced":["0"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":"pkg:golang/github.com/ory/oathkeeper","source":"GHSA-w9mr-28mw-j8hg"},{"ecosystem":"Go","fixed":["0.40.3"],"introduced":["0"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":"pkg:golang/github.com/ory/oathkeeper","source":"GO-2023-1747"}],"products":null,"published":"2023-04-26","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can bypass header-based authentication or authorization by dropping headers via Connection header manipulation in Go-based gateways.","url":"https://insights.sbomify.com/GHSA-w9mr-28mw-j8hg/"}