Network-wide security flaw discovered in NPM package
“Pac-resolver” vulnerability could lead to remote code execution
Sign up today and you will receive a free copy of our Future Focus 2025 report - the leading guidance on AI, cybersecurity and other IT challenges as per 700+ senior executives
You are now subscribed
Your newsletter sign-up was successful
Software code downloaded almost three million times a week could enable hackers to remotely execute code on a victim’s system.
The code in question is the popular NPM package "pac-resolver." The flaw, which could allow hackers on a local network to execute arbitrary code within a Node.js process whenever it tries to make an HTTP request, was discovered by developer Tim Perry.
Massive UPnProxy router flaw leaves millions open to hack attacks What is a proxy server? Blue Coat ProxyOne Appliance review
The package is used for PAC file support in Pac-Proxy-Agent, which is used in Proxy-Agent. This is the standard for HTTP proxy auto-detection and configuration in Node.js. The package is used extensively, from AWS's CDK toolkit to the Mailgun SDK to the Firebase CLI, and it racks up to three million downloads every week.
Perry found the bug while adding proxy support to HTTP Toolkit. The flaw affects software that depends on Pac-Resolver before v5.0.0 (even transitively) in a Node.js application.
The flaw affects any code using PAC files for proxy configuration or whatever proxy configuration is used by the target operating system that uses the WPAD protocol or a proxy configuration from an untrusted source.
“In any of those cases, an attacker (by configuring a malicious PAC URL, intercepting PAC file requests with a malicious file, or using WPAD [Web Proxy Auto-Discovery Protocol]) can remotely run arbitrary code on your computer any time you send an HTTP request using this proxy configuration,” Perry added.
The Pac-Proxy-Agent doesn't sandbox PAC scripts correctly, according to Perry. Internally, it uses two modules — Pac-Resolver and Degenerator — from the same author to build the PAC function. This means code running in one JavaScript virtual machine could access external data in the main node.js application, hence a remote code execution bug in the proxy configuration process.
Sign up today and you will receive a free copy of our Future Focus 2025 report - the leading guidance on AI, cybersecurity and other IT challenges as per 700+ senior executives
“If you're in this situation, you need to update (to Pac-Resolver v5 and/or Proxy-Agent v5) right now,” said Perry.
When it comes to so-called supply chain bugs of this sort, “you can outsource the coding, but you can’t outsource the responsibility” wrote Paul Ducklin, principal research scientist at Sophos
“Some bugs are only found because someone decided to take a careful look, as Tim Perry did here,” he added.
The vulnerability, formally named CVE-2021-23406, has since been fixed in v5.0.0 of all those packages.
Rene Millman is a freelance writer and broadcaster who covers cybersecurity, AI, IoT, and the cloud. He also works as a contributing analyst at GigaOm and has previously worked as an analyst for Gartner covering the infrastructure market. He has made numerous television appearances to give his views and expertise on technology trends and companies that affect and shape our lives. You can follow Rene Millman on Twitter.
-
Organizations hit by 90 zero-day vulnerabilities last yearNews Google Threat Intelligence researchers warn that edge devices and security appliances are prime entry points
-
Major data leak forum taken downNews LeakBase enabled the sale and purchase of a huge amount of personal data and had more than 142,000 members
-
Security agencies issue warning over critical Cisco Catalyst SD-WAN vulnerabilityNews Threat actors have been exploiting the vulnerability to achieve root access since 2023
-
Millions of developers could be impacted by flaws in Visual Studio Code extensions – here's what you need to know and how to protect yourselfNews The VS Code vulnerabilities highlight broader IDE security risks, said OX Security
-
CVEs are set to top 50,000 this year, marking a record high – here’s how CISOs and security teams can prepare for a looming onslaughtNews While the CVE figures might be daunting, they won't all be relevant to your organization
-
Microsoft patches six zero-days targeting Windows, Word, and more – here’s what you need to knowNews Patch Tuesday update targets large number of vulnerabilities already being used by attackers
-
Experts welcome EU-led alternative to MITRE's vulnerability tracking schemeNews The EU-led framework will reduce reliance on US-based MITRE vulnerability reporting database
-
Veeam patches Backup & Replication vulnerabilities, urges users to updateNews The vulnerabilities affect Veeam Backup & Replication 13.0.1.180 and all earlier version 13 builds – but not previous versions.
-
Two Fortinet vulnerabilities are being exploited in the wild – patch nowNews Arctic Wolf and Rapid7 said security teams should act immediately to mitigate the Fortinet vulnerabilities
-
Everything you need to know about Google and Apple’s emergency zero-day patchesNews A serious zero-day bug was spotted in Chrome systems that impacts Apple users too, forcing both companies to issue emergency patches
