Improper Certificate Validation Affecting org.webjars.npm:undici package, versions [7.27.1,]


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.14% (5th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGWEBJARSNPM-19635219
  • published6 Sept 2026
  • disclosed4 Sept 2026
  • creditJoshua Rogers

Introduced: 4 Sep 2026

NewCVE-2026-84961  (opens in a new tab)
CWE-295  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

org.webjars.npm:undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Improper Certificate Validation in the BalancedPool class, which deep-clones its connect and tls options with JSON.parse(JSON.stringify(...)) and thereby silently drops any function-valued callbacks, such as a custom checkServerIdentity or connector, before they reach the TLS layer. An attacker can present a server certificate that the caller's custom checkServerIdentity was written to reject and still have it accepted, as long as it passes Node's default hostname and chain checks, because the discarded check never runs. This affects only BalancedPool configured with function-valued connect or tls options, and not Client, Pool, Agent, or RoundRobinPool.

Workaround

This vulnerability can be avoided by using Client, Pool, or Agent instead of BalancedPool for connections that rely on a custom checkServerIdentity or connector, so the callback is not stripped before reaching the TLS layer.

CVSS Base Scores

version 4.0
version 3.1