Skip to content

Bump form-data to bring in fix for critical vulnerability #887

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 1 commit into from
Jul 30, 2025

Conversation

gowridurgad
Copy link
Contributor

@gowridurgad gowridurgad commented Jul 30, 2025

This PR upgrades the form-data dependency to version 4.0.4 using npm audit fix, resolving a critical security vulnerability identified as CVE-2025-7783.

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 #26
dependabot alert #27

@Copilot Copilot AI review requested due to automatic review settings July 30, 2025 07:30
@gowridurgad gowridurgad requested a review from a team as a code owner July 30, 2025 07:30
Copy link

@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 dependency to version 4.0.4 to address a critical security vulnerability (CVE-2025-7783) where the library used predictable Math.random() for generating multipart boundaries, potentially allowing attackers to inject additional fields or override values in form data requests.

  • Updates form-data from vulnerable versions to 4.0.4 which uses proper randomization
  • Adds license files for new transitive dependencies introduced by the upgrade
  • Updates existing dependency versions as part of the dependency resolution

Reviewed Changes

Copilot reviewed 18 out of 21 changed files in this pull request and generated 2 comments.

File Description
.licenses/npm/form-data-4.0.4.dep.yml Updates form-data license metadata from version 4.0.0 to 4.0.4
.licenses/npm/form-data-2.5.5.dep.yml Updates form-data license metadata from version 2.5.1 to 2.5.5
.licenses/npm/brace-expansion.dep.yml Updates brace-expansion license metadata from version 1.1.11 to 1.1.12
Multiple new .licenses/npm/*.dep.yml files Adds license metadata for new transitive dependencies (safe-buffer, math-intrinsics, hasown, etc.)

@HarithaVattikuti HarithaVattikuti merged commit e9343db into actions:main Jul 30, 2025
368 of 370 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