New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

Security News

Socket and Seal Security Collaborate to Fix Critical npm Overrides Bug

Socket and Seal Security collaborate to fix a critical npm overrides bug, resolving a three-year security issue in the JavaScript ecosystem's most popular package manager.

Socket and Seal Security Collaborate to Fix Critical npm Overrides Bug

Sarah Gooding

March 11, 2025

We're excited to announce that npm has finally released version 11.2.0, which includes a fix for a long-standing issue with the package manager's overrides feature. This improvement—the result of a collaboration between Socket, Seal Security, and npm—addresses a critical bug that had impacted JavaScript developers' ability to reliably override vulnerable dependencies for nearly three years.

The Problem with npm Overrides#

For those unfamiliar with the feature, npm's overrides functionality allows developers to specify custom versions of dependencies (including transitive dependencies) in their projects. This capability is crucial for security teams and developers who need to quickly mitigate vulnerabilities without waiting for upstream packages to update.

However, since its introduction, the overrides feature contained a serious flaw: after the first use, it would silently revert to the vulnerable version. This meant that many developers who thought they were protected by using overrides were unknowingly reintroducing vulnerable code into their projects.

A Three-Year Journey to Resolution#

The issue was first identified in January 2022 and formally documented in November 2022. Despite its security implications, the bug remained unfixed for years. In 2023, Alon Navon from Seal Security encountered the issue and elevated its importance to npm maintainers, eventually submitting a pull request in November 2023 to address the problem.

However, the fix remained unreviewed for nearly a year, highlighting some of the challenges faced by even the most critical open source projects.

When Socket engineer John-David Dalton began working on Socket Optimize in late 2024, he discovered that the overrides feature—a crucial component for the tool's functionality—still contained this unfixed bug. He got involved to help move the PR forward, leveraging relationships with open source collaborators at GitHub and npm, and worked to get the issue prioritized.

"Open source doesn't magically fix bugs on its own," John-David said. "But the relationships built within the community can help drive critical issues to resolution."

Following his advocacy and technical review, npm was able to assign a developer to finalize the fix, resulting in the bug finally being resolved after nearly three years. The fix has now been merged and released in npm version 11.2.0. Alon Navon has a full technical breakdown of this bug and its resolution on the Seal Security blog.

The Importance of Overrides for Security#

Reproducible builds are a cornerstone of secure software development. The overrides feature is particularly important for security teams because it allows them to quickly respond to vulnerabilities by overriding problematic dependencies, even deep in the dependency tree.

Without reliable overrides, teams were forced to use workarounds or accept the risk until upstream packages were updated. This fix ensures that when developers specify an override, it persists reliably throughout the build process.

Socket Optimize Already Implementing the Fix#

While waiting for the official npm release, we've been applying this fix in Socket Optimize since its development. Socket Optimize helps developers reduce transitive dependencies, leverage new platform features, improve performance, and address security issues using tested, optimized package overrides—all with a single command and a curated registry of packages.

With npm 11.2.0, these capabilities will now be available natively in npm itself, but It will take some time before this version is bundled with a Node.js release.

We're proud to have played a part in fixing this important issue alongside Seal Security and remain committed to improving the security of the JavaScript ecosystem. The positive outcome here demonstrates the vital importance engineers from security-focused companies driving critical open source contributions forward for the community. By combining our technical expertise with collaborative relationships across the ecosystem, we can address some of the most difficult, long-standing problems.

For those of you who are already using Socket Optimize, updating to npm 11.2.0 will make it even faster. Stay tuned for more updates on Socket Optimize and our ongoing work to make JavaScript development more secure and efficient.

Subscribe to our newsletter

Get notified when we publish new security blog posts!

Try it now

Ready to block malicious and vulnerable dependencies?

Install GitHub AppBook a demo

Related posts

Back to all posts