Skip to content

Bump form-data to fix critical vulnerabilities #182 & #183 #1163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2025

Conversation

aparnajyothi-y
Copy link
Contributor

This PR upgrades the form-data dependency to version 4.0.4 using npm audit fix, resolving a critical security vulnerability identified as GHSA-fjxv-7rqg-78g4.

Vulnerability Summary
form-data previously used Math.random() to generate boundary values for multipart form-encoded data. Because Math.random() is a pseudo-random number generator, it can be predicted if an attacker:

Can observe outputs of Math.random() in the application (e.g., via request headers), and

Can control at least one field in a form-data request.

This predictability allows an attacker to guess the multipart boundary, enabling them to inject additional fields or override values in downstream requests, leading to potential manipulation of internal services.

Affected Package
Package: form-data

Vulnerable Versions: < 2.5.4

Fixed Version: >= 2.5.4 (current version after fix: 4.0.4)

Resolution
This PR brings in the fix by allowing npm audit fix to bump the form-data version to 4.0.4, which no longer uses Math.random() and includes proper randomization for multipart boundaries.

Related issue:
dependabot alert #182
dependabot alert #183

@Copilot Copilot AI review requested due to automatic review settings July 30, 2025 07:43
@aparnajyothi-y aparnajyothi-y requested a review from a team as a code owner July 30, 2025 07:43
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the form-data package to version 4.0.4 to address critical security vulnerabilities (GHSA-fjxv-7rqg-78g4) where Math.random() was used for boundary generation, making multipart forms predictable to attackers.

  • Updated form-data from vulnerable versions to 4.0.4 which uses proper randomization
  • Included transitive dependency updates from npm audit fix
  • Added new license files for dependencies introduced by the security update

Reviewed Changes

Copilot reviewed 19 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.licenses/npm/form-data-4.0.4.dep.yml Updated form-data package version and metadata
.licenses/npm/form-data-2.5.5.dep.yml Updated legacy form-data version metadata
.licenses/npm/undici.dep.yml Minor version bump for undici dependency
.licenses/npm/brace-expansion.dep.yml Patch version update for brace-expansion
Multiple new .licenses/npm/*.dep.yml files License files for new transitive dependencies

@HarithaVattikuti HarithaVattikuti merged commit fbeb884 into actions:main Jul 30, 2025
1299 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy