-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: bump valibot to ^1.2.0 to address ReDoS vulnerability #2304
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
base: master
Are you sure you want to change the base?
fix: bump valibot to ^1.2.0 to address ReDoS vulnerability #2304
Conversation
Bumps valibot from ^0.38.0 to ^1.2.0 to fix a HIGH severity ReDoS vulnerability in EMOJI_REGEX (GHSA-vqpr-j7v3-hqw9). All tests pass with the new version. Fixes bitcoinjs#2303
|
@Sjors would you review this PR? |
|
Okay, let's solve this problem. |
|
@jasonandjay just checking if there's anything else needed for this to be merged? |
junderw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with bumping the dependency if it doesn't break anything.
But I don't understand how this affects us. If you could explain how the vulnerability affects this library I will treat this PR with more urgency.
Please remove the peer: true stuff.
|
The gitdiff job failure is probably due to all the |
Clean up package-lock.json to only contain the valibot version bump without the spurious peer:true markers that npm automatically adds.
|
Hi @junderw, thank you for the feedback! I've removed the How this vulnerability affects bitcoinjs-lib: The valibot library is used in bitcoinjs-lib for input validation (schema validation). The vulnerability GHSA-vqpr-j7v3-hqw9) is a ReDoS (Regular Expression Denial of Service) issue in valibot's While bitcoinjs-lib may not directly use emoji validation, the vulnerable regex pattern exists in the valibot package regardless. An attacker could potentially:
Bumping to valibot v1.2.0 fixes this by using a safer regex implementation that doesn't suffer from exponential backtracking. The fix is a low-risk dependency bump that addresses a potential DoS vector without any breaking changes to the API. |
|
ahhh ok I see. The gitdiff problem was caused by the update to valibot. Please run Thanks. I am still not sure if this is a vulnerability in all string validations or if it's just a vulnerability in a specific validation that we don't use. |
Summary
Bumps
valibotfrom^0.38.0to^1.2.0to fix a HIGH severity ReDoS vulnerability inEMOJI_REGEX.Security Advisory
Testing
Fixes #2303
Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=101010297