fix: bump valibot to ^1.2.0 to address ReDoS vulnerability#2304
fix: bump valibot to ^1.2.0 to address ReDoS vulnerability#2304DanielDerefaka wants to merge 2 commits into
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.
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. |
Even if the affected validation isn’t used in practice, the advisory still propagates to downstream projects and causes audit / CI failures. |
|
Close in favor of #2308 |
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