HTTPS Agent PFX object-array key collision allows mTLS client identity reuse across different per-request certificates
The HTTPS Agent in Node.js builds its connection-reuse cache key from PFX options in a way that can collide when an array of PFX objects is supplied, so a pooled connection created for one client certificate may be reused for a request configured with a different certificate. An attacker who can influence which certificate a request uses could then have their request sent under another identity's mTLS client certificate.
- Triaged in 7 days
- Fixed in 37 days
- Disclosed after 37 days
Summary by the program
A flaw in Node.js HTTPS Agent connection reuse can cause PFX object-array key collisions, allowing mutual TLS (mTLS) client identities to be reused across requests configured with different client certificates.
This vulnerability affects Node.js 26.x, 24.x, and 22.x.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the cache key for pooled HTTPS connections serialises PFX object arrays in a way that produces identical keys for distinct certificate configurations, so the agent treats different client identities as interchangeable.
Impact
A request configured with one client certificate could be sent over a reused connection authenticated with a different certificate, potentially letting one identity act as another in mTLS-protected services.
What the attacker needed
Node.js 22.x, 24.x or 26.x; app uses HTTPS Agent with PFX object arrays; requests use different client certificates
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program makes many HTTPS requests, it keeps connections open and reuses them to save time. To decide whether an existing connection is suitable, it builds a short key from the request's settings, including the client certificate used to prove identity. Here that key can come out the same for two different certificates, so a request meant to use one identity can travel over a connection already authenticated as another identity.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.