Wednesday, April 8, 2026

Critical JavaScript Library Vulnerability Exposes Apps to Remote Attacks

A critical security vulnerability has been discovered in the widely-used form-data JavaScript package, potentially exposing thousands of applications to remote attacks through predictable boundary value generation.

The vulnerability, designated as CVE-2025-7783, was published five days ago by Jordan Harband (ljharb), a prominent JavaScript developer and former TC39 specification editor.

Vulnerability Overview

The security flaw stems from form-data’s reliance on JavaScript’s Math.random() function to generate boundary values for multipart form-encoded data.

This seemingly innocuous design choice creates a critical security weakness because Math.random() produces pseudo-random, predictable values that sophisticated attackers can exploit to inject malicious parameters into HTTP requests.

AttributeValue
CVE IDCVE-2025-7783
SeverityCritical
CVSS 4.0 ScoreCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
CWE ClassificationCWE-330 (Use of Insufficiently Random Values)
Affected Packageform-data (npm)
Vulnerable Versions< 2.5.4, 3.0.0-3.0.3, 4.0.0-4.0.3
Patched Versions2.5.4, 3.0.4, 4.0.4
Attack VectorNetwork
Attack ComplexityHigh

The vulnerability affects multiple versions of the form-data package, including all versions prior to 2.5.4, versions 3.0.0 through 3.0.3, and versions 4.0.0 through 4.0.3.

Organizations using these versions face immediate risk of parameter injection attacks that could compromise internal systems and expose sensitive data.

Attackers can exploit this vulnerability by observing Math.random() values generated by target applications and using mathematical techniques to predict the pseudo-random number generator’s internal state.

Once the PRNG state is determined, attackers can forecast future boundary values and craft malicious payloads containing predicted boundaries followed by attacker-controlled fields.

The attack scenario requires two conditions: the attacker must observe other Math.random() values produced by the target application, and they must control at least one field in a form-data request.

Common observation vectors include request ID headers used for distributed tracing, which frequently employ Math.random() for generation.

Applications become vulnerable when they use form-data to transmit user-controlled data to backend systems while simultaneously revealing Math.random() values through various channels.

Successful exploitation allows attackers to inject arbitrary parameters into requests, potentially overwriting intended values or adding malicious data that bypasses security controls.

The vulnerability received a critical CVSS 4.0 rating due to its network-based attack vector and potential for high impact on both confidential data and system integrity.

Security researchers have developed proof-of-concept exploits demonstrating practical exploitation scenarios.

Organizations must immediately upgrade to patched versions: 2.5.4, 3.0.4, or 4.0.4, depending on their current implementation.

The patches replace Math.random() with cryptographically secure random number generation, eliminating the predictability that enables these attacks.

Get Free Ultimate SOC Requirements Checklist Before you build, buy, or switch your SOC for 2025 - Download Now

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Network Penetration Testing Checklist – 2025

Network penetration testing is a cybersecurity practice that simulates...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories: identity,...

EvilTokens Uses Stolen Microsoft 365 Tokens, AI to Supercharge BEC

EvilTokens is a new Phishing-as-a-Service (PhaaS) platform that turns...

IBM Security Verify Access Flaws Let Remote Attackers Access Sensitive Data

IBM has issued an urgent security bulletin addressing a...

Masjesu Botnet Targets Routers in Commercial DDoS Attacks

Hackers are abusing the Masjesu botnet to run high-volume DDoS-for-hire attacks...

GreyNoise Launches C2 Detection for Exploited Edge Devices

GreyNoise has introduced a new capability, C2 Detection, to identify...

Top 10 Best Multi-Factor Authentication (MFA) Providers in 2026

In the digital realm of 2026, the traditional password...

Multiple OpenSSL Flaws Expose Sensitive Data in RSA KEM Handling

A newly disclosed flaw in OpenSSL could allow attackers...

Docker Authorization Bypass Flaw Exposed Hosts to Potential Attackers

A high-severity security vulnerability has been discovered in Docker...

Remus Infostealer Debuts With Stealthy New Credential-Theft Tactics

Hackers are rolling out a new 64‑bit infostealer dubbed Remus....

Related Articles

Recent News