Advisory

GHSA-q257-vv4p-fg92

Also known as: CVE-2017-16005

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.

This problem occurs because vulnerable versions of http-signature sign the contents of headers, but not the header names.

Proof of Concept

Consider this to be the initial, untampered request:

POST /pay HTTP/1.1
Host: example.com
Date: Thu, 05 Jan 2012 21:31:40 GMT
X-Payment-Source: [email protected]
X-Payment-Destination: [email protected]
Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="x-payment-source x-payment-destination" MDyO5tSvin5...

And the request is intercepted and tampered as follows:

X-Payment-Source: [email protected] // Emails switched
X-Payment-Destination: [email protected]
Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="x-payment-destination x-payment-source" MDyO5tSvin5...

In the resulting responses, both requests would pass signature verification without issue.

[email protected]\n
[email protected]\n

Recommendation

Update to version 0.10.0 or higher.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2018-11-09 17:49 UTC
Modified
2023-11-08 03:58 UTC

Affected packages and fixes

http-signature

npm · All systems

Affected

  • introduced 0, fixed 0.10.0 (semver)

Fixed versions

0.10.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences