# CVE-2017-16005: Header Forgery in http-signature

> Attackers can forge HTTP request headers by swapping names without invalidating signatures, allowing request manipulation in applications using this Node.js library.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Jun 2018
- **Updated:** 16 Sep 2024
- **Also known as:** CLSA-2026-1774570933, GHSA-q257-vv4p-fg92

## What is CVE-2017-16005?

CVE-2017-16005 is a high-severity vulnerability in HackerOne http-signature node module, published on 4 Jun 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Http-signature is a "Reference implementation of Joyent's HTTP Signature Scheme". In versions <=0.9.11, http-signature signs only the header values, but not the header names. This makes http-signature vulnerable to header forgery. Thus, if an attacker can intercept a request, he can swap header names and change the meaning of the request without changing the signature.

Weakness: CWE-347 (Improper Verification of Cryptographic Signature), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2017-16005?

2 open source packages ship an affected version, including http-signature. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `http-signature` | npm | All versions | 0.10.0 |
| `http-signature` | npm | All versions | 0.10.0 |

Products: Joyent Http-Signature.

## How do I fix CVE-2017-16005?

Upgrade http-signature to 0.10.0 or later.

## Is CVE-2017-16005 being exploited?

There is no known exploitation of CVE-2017-16005 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-16005 and fix it if it is affected.

What it is: CVE-2017-16005 is a high-severity vulnerability in HackerOne http-signature node module, published on 4 Jun 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2017-16005 in the wild and no public exploit code.

Affected packages and fixed versions:
- http-signature (npm): affected all versions; fixed in 0.10.0
- http-signature (npm): affected all versions; fixed in 0.10.0

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2017-16005/ (Markdown: https://insights.sbomify.com/CVE-2017-16005/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2017-16005
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2017-16005
- OSV: https://osv.dev/vulnerability/CVE-2017-16005

---
From sbomify Insights: https://insights.sbomify.com/CVE-2017-16005/
Summaries are generated and may contain mistakes; the official description above is the record.
