Skip to main content
/ Architecture

JavaScript Security in 2025-2026: Critical Vulnerabilities, CVEs, and Why Your Website Needs Constant Vigilance

Sacha Roussakis-NotterSacha Roussakis-Notter
18 min read
Node.js
React
TypeScript
Share

The JavaScript ecosystem faced critical vulnerabilities in 2025-2026, from the React2Shell RCE to the Shai-Hulud npm attack. Learn about major CVEs, OWASP Top 10 2025, and why ongoing security maintenance isn't optional.

The Reality of JavaScript Security

If you're running a JavaScript application—React, Next.js, Node.js, or any modern web stack—you're operating in one of the most targeted ecosystems in software. The npm registry alone sees over 2 billion package downloads per week, making it a prime target for attackers.

2025 was a wake-up call. From maximum-severity remote code execution vulnerabilities in React Server Components to the largest supply chain attack in npm history, the message is clear: security isn't a one-time checkbox—it's an ongoing process.

This post covers the critical vulnerabilities that defined 2025-2026, the updated OWASP Top 10, and what developers and businesses must do to protect their applications.

flowchart

Required Defense

Business Impact

2025-2026 Threat Landscape

Remote Code Execution

Supply Chain Attacks

Prototype Pollution

Misconfigurations

Server compromise

Data theft

Denial of service

Security breaches

Constant updates

Dependency auditing

Security monitoring

Security processes

Ctrl+scroll to zoom • Drag to pan47%

JavaScript CVE Growth Trend

area chart
npm/Node.js CVEs by Year
critical
high
medium
2020202120222023202420250100200300400
Hover for detailsbuun.group

The trend is clear: JavaScript vulnerabilities are accelerating. 2025 saw a 40% increase in critical CVEs compared to 2024.

2025 Security Incident Timeline

timeline
JanuaryNode.js securityreleaseHTTP/2 memoryleak patchedMayHTTP requestsmuggling fixedWindows memoryleak CVEJulyPath traversalbypassHashDoSreintroductionSeptemberShai-Hulud npmattack500+ packagescompromisedCISA advisoryissuedNovemberOWASP Top 102025 releasedGlob package CVEdisclosedDecemberReact2ShellCVE-2025-55182Node.jsemergencypatchesJavaScript Ecosystem Security Events 2025
Ctrl+scroll to zoom • Drag to pan38%

Critical CVEs That Shook the JavaScript Ecosystem

CVE-2025-55182: React2Shell (Maximum Severity)

Severity: Critical (10.0 CVSS)

Affected: React Server Components, Next.js applications using RSC

Impact: Unauthenticated Remote Code Execution

In December 2025, security researcher Lachlan Davidson disclosed CVE-2025-55182, a maximum-severity vulnerability in React Server Components that allows attackers to achieve unauthenticated remote code execution on the server.

How it works:

flowchart
1. Malicious RSC payload
2. Deserialize
3. spawnSync
4. Shell access

Attacker

Server

Node.js

Ctrl+scroll to zoom • Drag to pan57%

Resolution:

  • Upgrade React and Next.js to patched versions immediately
  • Review server logs for suspicious RSC payloads
  • Implement WAF rules to filter malformed RSC requests

Source: Help Net Security - React, Node.js vulnerability patched

CVE-2025-64756: The Glob Package Crisis

Severity: High

Affected: glob npm package (used by virtually every Node.js project)

Impact: Widespread SAST failures, deployment blocks

On November 17, 2025, CVE-2025-64756 started affecting Node.js images broadly. The glob package is a transitive dependency in almost every Node.js project, meaning you probably have it even if you never installed it directly.

The chaos:

  • SAST tools immediately flagged vulnerable glob versions
  • CI/CD pipelines blocked deployments across thousands of projects
  • Teams scrambled to update dependencies they didn't know they had

Resolution:

bash
1npm audit
2npm update glob
3npm audit fix --force # Use with caution

Node.js Security Releases (2025)

The Node.js project released multiple security updates throughout 2025:

ReleaseDateVulnerabilities Fixed
January 2025Jan 21HTTP/2 memory leak, GOAWAY handling
May 2025May 14HTTP request smuggling, Windows memory leak
July 2025Jul 15Path traversal (Windows), HashDoS reintroduction
December 2025Dec 153 high severity, 1 medium, 1 low

Source: Node.js Vulnerability Announcements

Key vulnerabilities:

  • CVE-2025-23084: Windows device name path traversal bypass
  • CVE-2025-23165: Memory leak in ReadFileUtf8 (Windows)
  • HTTP Request Smuggling: Parser allowing improper header termination

Resolution:

bash
1# Check your Node.js version
2node --version
3
4# Update to latest LTS
5nvm install 22 # or download from nodejs.org
Current LTSStatusRecommended
Node.js 22.xActive LTSYes
Node.js 20.xMaintenance LTSYes
Node.js 18.xEnd of Life April 2025Upgrade now

The Shai-Hulud Attack: npm's Worst Day

What Happened

On September 8, 2025, the JavaScript ecosystem experienced one of the most significant supply chain attacks in its history. A self-replicating worm dubbed "Shai-Hulud" compromised over 500 npm packages, including widely-used libraries like debug, chalk, and ansi-styles.

The numbers:

  • 18 initial packages compromised
  • 2.6+ billion weekly downloads affected
  • Malicious versions live for ~2 hours
  • 500+ packages ultimately infected via worm propagation

The Attack Chain

flowchart

Phishing email

Fake 2FA page

Credentials stolen

Malicious versions

Crypto stealer

API keys stolen

Scan for npm tokens

Infect more packages

Supply chain cascade

Ctrl+scroll to zoom • Drag to pan34%

The Payload

The malicious code served two purposes:

  1. Crypto-stealer: Executed in browsers to drain cryptocurrency wallets
  2. Credential harvester: Targeted GitHub PATs and cloud provider API keys

Self-Propagation

What made Shai-Hulud unprecedented was its self-replicating nature:

state diagram

Package infected

Detect tokens

Tokens found

No tokens

Modify tarballs

Republish

Spreads to next

Compromised

Scanning

Found

Dormant

Infecting

Publishing

Ctrl+scroll to zoom • Drag to pan47%

Sources:

Required Actions

  • Rotate all developer credentials (npm, GitHub, cloud providers)
  • Enable phishing-resistant MFA on all accounts
  • Audit package-lock.json for affected package versions
  • Review CI/CD pipeline for compromised dependencies
  • Implement Trusted Publishing for your packages

Prototype Pollution: The Hidden Killer

Prototype pollution remains one of the most insidious JavaScript vulnerabilities, and 2025 saw continued exploitation.

How It Works

JavaScript allows modification of object prototypes. Attackers exploit this to inject malicious properties:

javascript
1// Vulnerable code
2function merge(target, source) {
3 for (let key in source) {
4 target[key] = source[key];
5 }
6 return target;
7}
8
9// Malicious payload
10const payload = JSON.parse('{"__proto__": {"isAdmin": true}}');
11merge({}, payload);
12
13// Now ALL objects have isAdmin: true
14console.log({}.isAdmin); // true - privilege escalation!

Notable 2025 Prototype Pollution CVEs

CVEPackageImpact
CVE-2025-57820devalueParse function pollution
CVE-2025-64718js-yamlYAML parsing exploitation
SNYK-JS-LODASH-6139239lodashzipObjectDeep vulnerability

Lodash, with 25+ million weekly downloads, has been a repeated target. The zipObjectDeep vulnerability in older versions allows prototype pollution through improper input sanitisation.

Resolution:

bash
1# Check for vulnerable lodash versions
2npm ls lodash
3
4# Update to secure version
5npm update lodash@^4.17.21

Sources:

OWASP Top 10 2025: What Changed

The OWASP Top 10 2025 was released on November 6, 2025, with significant changes reflecting the evolving threat landscape.

The 2025 List

RankCategoryChange from 2021
A01Broken Access Control— (Still #1)
A02Security Misconfiguration↑ from #5
A03Software Supply Chain FailuresNEW
A04Cryptographic Failures↓ from #2
A05Injection↓ from #3
A06Insecure Design↓ from #4
A07Authentication Failures
A08Software and Data Integrity Failures
A09Security Logging and Alerting Failures
A10Mishandling of Exceptional ConditionsNEW

Key Changes

A03: Software Supply Chain Failures (NEW)

This new category directly addresses attacks like Shai-Hulud. It expands on 2021's "Vulnerable and Outdated Components" to include:

  • Dependency management
  • Build system security
  • Distribution infrastructure
  • Package integrity verification

A02: Security Misconfiguration (UP from #5)

The rise reflects growing configuration complexity in modern applications. Default credentials, unnecessary features enabled, and improper cloud configurations remain rampant.

A10: Mishandling of Exceptional Conditions (NEW)

Covers improper error handling, logical errors, failing open, and other scenarios stemming from abnormal conditions.

Source: OWASP Top 10:2025 Official

Vulnerability Distribution by Category

pie chart
2025 JS Vulnerabilities by Type
Injection/RCE
Misconfig
Other
Prototype Pollution
Supply Chain
Hover for detailsbuun.group

Why Ongoing Security Maintenance Is Non-Negotiable

The Zero-Day Reality

A zero-day vulnerability is a security flaw that:

  1. Is unknown to the software vendor
  2. Has no available patch
  3. May already be exploited in the wild

The timeline problem:

  • Average time from vulnerability discovery to patch: 30-60 days
  • Average time from patch release to enterprise deployment: 60-90 days
  • Attacker exploitation window: 24-48 hours after public disclosure
gantt chart
Jan 05Jan 12Jan 19Jan 26Feb 02Feb 09Feb 16Feb 23Mar 02Mar 09Mar 16Mar 23Mar 30Apr 06Discovery Vendor notified Patch developed Patch released Public disclosure Patch assessment Exploits in wild Testing Deployment VulnerabilityAttack WindowEnterpriseCVE Response Timeline Reality
Ctrl+scroll to zoom • Drag to pan65%

The Cost of Neglect

bar chart
Average Security Incident Costs (AUD)
max
min
DefacementData BreachRansomwareRegulatory Fine$0$150000$300000$450000$600000
Hover for detailsbuun.group
ScenarioAverage Cost (AUD)
Website defacement$15,000 - $50,000
Data breach (SMB)$50,000 - $200,000
Ransomware attack$100,000 - $500,000+
Regulatory fine (Privacy Act)$50,000 - $500,000+
Reputational damageIncalculable

What "Maintained" Actually Means

flowchart

On CVE Disclosure

CVE announced

Impact assessment

Emergency patching

Verification

Quarterly Tasks

Penetration testing

Access review

Policy review

Monthly Tasks

Runtime updates

Vulnerability scanning

Backup verification

Weekly Tasks

Dependency audit

Log review

Security monitoring

Ctrl+scroll to zoom • Drag to pan25%

Your Security Checklist

Immediate Actions

  • Run npm audit on all projects
  • Update Node.js to current LTS (22.x or 20.x)
  • Review React/Next.js versions for CVE-2025-55182
  • Enable 2FA on npm and GitHub (phishing-resistant preferred)
  • Review package-lock.json for Shai-Hulud affected packages

Ongoing Security Process

  • Weekly dependency audits (npm audit, Snyk, Dependabot)
  • Subscribe to security mailing lists (Node.js, npm, framework-specific)
  • Implement lockfile integrity verification in CI/CD
  • Use npm ci instead of npm install in production builds
  • Pin dependencies or use strict semver ranges
  • Regular penetration testing (at least annually)

Tools We Recommend

ToolPurposeCost
npm auditBuilt-in dependency scanningFree
SnykComprehensive vulnerability scanningFree tier available
DependabotAutomated dependency updatesFree for GitHub
Socket.devSupply chain attack detectionFree tier available
OWASP ZAPPenetration testingFree

How Buun Group Approaches Security

We don't treat security as an afterthought—it's built into every project we deliver.

Our Security Process

flowchart

Maintenance

Monitoring

Patching

Reports

Incident response

Deployment

Lockfile

Container scan

Secrets mgmt

Security headers

Development

Vetted deps

npm audit

Static analysis

Code review

Ctrl+scroll to zoom • Drag to pan52%

What We Do for Every Client

During Development:

  • Strict dependency vetting (no unnecessary packages)
  • Automated npm audit in CI pipeline
  • OWASP-aligned security code review
  • Secure authentication patterns (no JWT in localStorage)

At Deployment:

  • Lockfile integrity verification
  • Security headers (CSP, HSTS, X-Frame-Options)
  • Environment-based secrets management
  • HTTPS everywhere (no exceptions)

Ongoing Maintenance:

  • Weekly dependency vulnerability monitoring
  • Rapid response to critical CVEs (same-day assessment)
  • Monthly security status reports
  • Documented incident response procedures

Security Maintenance Packages

PackageWhat's IncludedInvestment
EssentialWeekly audits, critical patches, monthly report$200/month
Professional+ Penetration testing, priority response$500/month
Enterprise+ Dedicated security review, compliance supportCustom

The Bottom Line

The JavaScript ecosystem powers the modern web, but with that power comes constant security responsibility. The vulnerabilities of 2025—CVE-2025-55182, Shai-Hulud, the glob crisis—weren't edge cases. They affected millions of applications, including probably some of yours.

Security isn't a feature you add once. It's an ongoing process that requires:

  • Vigilance: Monitoring for new vulnerabilities
  • Speed: Rapid response to disclosures
  • Process: Systematic approach to updates and patches
  • Expertise: Understanding what matters and what doesn't

If you're running a business-critical application, the question isn't whether you can afford ongoing security maintenance—it's whether you can afford not to.

Further Reading:

Concerned about your application's security?

Topics

JavaScript securitynpm vulnerabilities 2025CVE-2025-55182Node.js securityOWASP Top 10 2025supply chain attack npmprototype pollutionReact security

Share this post

Share

Comments

Sign in to join the conversation

Login

No comments yet. Be the first to share your thoughts!

Found an issue with this article?

/ Let's Talk

Want to work with us?

Whether you need help with architecture, development, or technical consulting, our team is here to help bring your vision to life.