Improper Handling of Undefined Values Affecting proxy package, versions <2.1.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.24% (65th 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-JS-PROXY-5661790
  • published31 May 2023
  • disclosed31 May 2023
  • creditOri Hollander

Introduced: 31 May 2023

CVE-2023-2968  (opens in a new tab)
CWE-232  (opens in a new tab)

How to fix?

Upgrade proxy to version 2.1.1 or higher.

Overview

proxy is an An HTTP proxy written with Node.js (think Squid)

Affected versions of this package are vulnerable to Improper Handling of Undefined Values which allows the attacker to trigger a denial of service via the socket.remoteAddress variable. Exploiting this vulnerability is possible by sending a crafted HTTP request.

PoC

import * as http from 'http';
import { createProxy } from 'proxy';

const server = createProxy(http.createServer());
server.listen(31285, () => {
    var port = server.address().port;
    console.log('HTTP(s) proxy server listening on port %d',
port);
});

An attacker can crash the program by sending a valid HTTP GET request followed by invalid tail data

CVSS Scores

version 3.1