Skip to content

[Snyk] Upgrade react-hook-form from 7.68.0 to 7.70.0#330

Open
chirag127 wants to merge 1 commit into
mainfrom
snyk-upgrade-c4d11dc2b1142ec534427f10ee318da0
Open

[Snyk] Upgrade react-hook-form from 7.68.0 to 7.70.0#330
chirag127 wants to merge 1 commit into
mainfrom
snyk-upgrade-c4d11dc2b1142ec534427f10ee318da0

Conversation

@chirag127
Copy link
Copy Markdown
Owner

snyk-top-banner

Snyk has created this PR to upgrade react-hook-form from 7.68.0 to 7.70.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 2 versions ahead of your current version.

  • The recommended version was released 22 days ago.

Release notes
Package name: react-hook-form
  • 7.70.0 - 2026-01-04

    ✅ watch type improvement (#13228)
    🐞 fix: prevent field array ghost elements with keepDirtyValues (#13188)
    🐞 fix: improve invalid date handling in deepEqual and validation (#13230)
    🐞 fix(types): handle branded types correctly in DeepPartial (#13222)
    🐞 fix native validation focus issue (#13220)
    🐞 change spread operator to set name with depricated names prop, then override with new name prop is supplied (#13214)
    🐞 fix: prevent duplicate subscription trigger in setValue (#13206) (#13209)
    👌 chore: fix lib type check include tests (#13229)

    thanks to @ EdwardEB, @ constantly-dev & @ a28689604

  • 7.69.0 - 2025-12-20

    📏 feat: align API with useWatch (#13192)
    🤦🏻‍♂️ chore: update @ deprecated names prop on (#13198)
    🏥 chore: safely call function methods on elements (#13190)
    🪖 chore: cve-2025-67779 (#13196)
    🪖 chore: cve-2025-55184 & cve-2025-55183 (#13194)
    🪖 chore: CVE-2025-55182 Critical RCE vulnerabilty (#13175)
    🔬 test: add regression tests for #12837 and #13136 (#13187)
    🐞 fix(reset): preserve isValid state when keepIsValid option is used (#13173)
    🐞 fix: ensure each createFormControl.subscribe subscription listens only to the changes it subscribes to (#12968)
    🐞 fix(validation): batch isValidating state updates with validation result (#13181)
    🐞 fix(createFormControl): resolve race condition between setError and setFocus (#13138) (#13169)
    🧿 fix control prop type (#13189)
    🔔 chore: clean cloneObject logic (#13179)

    thanks to @ PierreCrb, @ a28689604, @ AnuragM7666, @ ap0nia, @ dusan233 & @ hlongc

  • 7.68.0 - 2025-12-03

    🎧 feat: <FormStateSubscribe /> component (#13142)

    import { useForm, FormStateSubscribe } from 'react-hook-form';

    const App = () => {
    const { register, control } = useForm();

    return (
    <div>
    <form>
    <input {...register('foo')} />
    <input {...register('bar')} />
    </form>
    {/* re-render only when formState of foo changes */}
    <FormStateSubscribe
    control={control}
    name={"foo"}
    render={({errors}) => <span>{errors.foo?.message}</span>}
    />
    </div>
    );
    };

    🐞 fix: clear validation errors synchronously in reset() to fix Next.js 16 Server Actions issue (#13139)
    Revert "✨ fix(types): allow undefined value with async defaultValues in Contr…" (#13171)

    thanks to @ xiangnuans, @ abnud11, @ ntatoud & @ ap0nia

from react-hook-form GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade react-hook-form from 7.68.0 to 7.70.0.

See this package in npm:
react-hook-form

See this project in Snyk:
https://app.snyk.io/org/whyiswhen/project/78a645b9-8d39-4aad-9b8c-1a17bfe9d156?utm_source=github&utm_medium=referral&page=upgrade-pr
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 26, 2026

Important

Review skipped

Ignore keyword(s) in the title.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @chirag127, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs an essential upgrade of the react-hook-form library to version 7.70.0. The primary goal is to enhance the application's security posture by incorporating critical vulnerability fixes, including a Remote Code Execution (RCE) patch. Additionally, this update delivers a range of bug fixes and type improvements, contributing to overall application stability and developer experience when managing forms.

Highlights

  • Dependency Upgrade: The react-hook-form library has been upgraded from version 7.68.0 to 7.70.0.
  • Critical Security Fixes: This upgrade includes patches for several CVEs, most notably a Critical Remote Code Execution (RCE) vulnerability (CVE-2025-55182) addressed in version 7.69.0.
  • Bug Fixes and Stability Improvements: Various bug fixes are incorporated, addressing issues such as field array ghost elements, invalid date handling, native validation focus, duplicate subscription triggers in setValue, and race conditions between setError and setFocus.
  • Type Improvements: The update brings improvements to watch type definitions and correct handling of branded types in DeepPartial.
  • Form State Management: Ensures isValid state preservation when the keepIsValid option is used with reset() and batches isValidating state updates with validation results.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@qodo-code-review
Copy link
Copy Markdown

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: build

Failed stage: Install dependencies [❌]

Failed test name: ""

Failure summary:

The action failed during the npm install step because package.json was not found at the expected
repository root path:
- Missing file:
/home/runner/work/WebDev-Odyssey-Full-Stack-Bootcamp-Showcase-Portfolio/WebDev-Odyssey-Full-Stack-Bootcamp-Showcase-Portfolio/package.json

- npm exited with ENOENT (Could not read package.json) and the job ended with exit code 254.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

114:  node-version: 20
115:  always-auth: false
116:  check-latest: false
117:  token: ***
118:  ##[endgroup]
119:  Found in cache @ /opt/hostedtoolcache/node/20.20.0/x64
120:  ##[group]Environment details
121:  node: v20.20.0
122:  npm: 10.8.2
123:  yarn: 1.22.22
124:  ##[endgroup]
125:  ##[group]Run npm install
126:  �[36;1mnpm install�[0m
127:  shell: /usr/bin/bash -e {0}
128:  ##[endgroup]
129:  npm error code ENOENT
130:  npm error syscall open
131:  npm error path /home/runner/work/WebDev-Odyssey-Full-Stack-Bootcamp-Showcase-Portfolio/WebDev-Odyssey-Full-Stack-Bootcamp-Showcase-Portfolio/package.json
132:  npm error errno -2
133:  npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/home/runner/work/WebDev-Odyssey-Full-Stack-Bootcamp-Showcase-Portfolio/WebDev-Odyssey-Full-Stack-Bootcamp-Showcase-Portfolio/package.json'
134:  npm error enoent This is related to npm not being able to find a file.
135:  npm error enoent
136:  npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2026-01-26T05_08_23_449Z-debug-0.log
137:  ##[error]Process completed with exit code 254.
138:  Post job cleanup.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedwebpack@​5.76.0 ⏵ 5.63.095 -125 -7394 +195 +3100
Updatedwebpack-cli@​4.9.1 ⏵ 4.10.097 +110010083100
Updatedwebpack-dev-server@​4.7.4 ⏵ 4.15.2959810090100
Updatedreact-hook-form@​7.68.0 ⏵ 7.71.197100100 +195 -1100

View full report

@socket-security
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Critical
Critical CVE: Prototype pollution in webpack npm loader-utils

CVE: GHSA-76p3-8jx3-jpfq Prototype pollution in webpack loader-utils (CRITICAL)

Affected versions: >= 2.0.0 < 2.0.3; < 1.4.1

Patched version: 2.0.3

From: main/39 - Minting NFTs and Building an NFT Marketplace like OpenSea/Folder - 478 - opend-1/opend/package-lock.jsonnpm/loader-utils@2.0.2

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/loader-utils@2.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Critical
Critical CVE: Cross-realm object access in Webpack 5

CVE: GHSA-hc6q-2mpp-qw7j Cross-realm object access in Webpack 5 (CRITICAL)

Affected versions: >= 5.0.0 < 5.76.0

Patched version: 5.76.0

From: main/39 - Minting NFTs and Building an NFT Marketplace like OpenSea/Folder - 478 - opend-starting/opend/package.jsonnpm/webpack@5.63.0

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/webpack@5.63.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request, automatically generated by Snyk, upgrades react-hook-form from version 7.68.0 to 7.70.0. This is a minor version update and appears to be safe to merge.

Based on the provided release notes, this upgrade includes several bug fixes, type improvements, and importantly, security fixes for multiple vulnerabilities, including one described as a critical RCE. Although the Snyk metadata does not list any vulnerabilities being fixed, the release notes for version 7.69.0 explicitly mention them.

The changes are confined to package.json and package-lock.json and are consistent with a standard dependency upgrade. Given the benefits of the bug and security fixes, I recommend merging this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants