From d1cf6a9b0f74d587dea1d0f194d922ff94eddd06 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Thu, 14 Jan 2021 16:04:44 +0100 Subject: [PATCH] src: drop localhost6 as allowed host for inspector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CVE-ID: CVE-2021-22884 Refs: https://hackerone.com/bugs?report_id=1069487 PR-URL: https://github.com/nodejs/node/pull/244 Reviewed-By: Beth Griggs Reviewed-By: Daniel Bevenius Reviewed-By: Mary Marchini Reviewed-By: Michael Dawson Reviewed-By: Michaƫl Zasso Reviewed-By: Rich Trott Reference: https://github.com/nodejs/node/commit/d1cf6a9b0f74d587dea1d0f194d922ff94eddd06 --- src/inspector_socket.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/inspector_socket.cc b/src/inspector_socket.cc index dc36359..38b9ed4 100644 --- a/src/inspector_socket.cc +++ b/src/inspector_socket.cc @@ -576,8 +576,7 @@ class HttpHandler : public ProtocolHandler { bool IsAllowedHost(const std::string& host_with_port) const { std::string host = TrimPort(host_with_port); return host.empty() || IsIPAddress(host) - || node::StringEqualNoCase(host.data(), "localhost") - || node::StringEqualNoCase(host.data(), "localhost6"); + || node::StringEqualNoCase(host.data(), "localhost"); } bool parsing_value_; -- 2.23.0