fix(deps): update dependency valibot to v1.2.0 [security]#727
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update dependency valibot to v1.2.0 [security]#727renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
bc30ce5 to
cd33df6
Compare
7a4ea89 to
e8c396b
Compare
d448186 to
622e4ad
Compare
4473eff to
fed3879
Compare
8d2fe0d to
31567f1
Compare
025c34e to
a1470b7
Compare
698f8ac to
21a36b8
Compare
21a36b8 to
976dc8f
Compare
976dc8f to
fe3d0f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.0.0→1.2.0GitHub Vulnerability Alerts
CVE-2025-66020
Summary
The
EMOJI_REGEXused in theemojiaction is vulnerable to a Regular Expression Denial of Service (ReDoS) attack. A short, maliciously crafted string (e.g., <100 characters) can cause the regex engine to consume excessive CPU time (minutes), leading to a Denial of Service (DoS) for the application.Details
The ReDoS vulnerability stems from "catastrophic backtracking" in the
EMOJI_REGEX. This is caused by ambiguity in the regex pattern due to overlapping character classes.Specifically, the class
\p{Emoji_Presentation}overlaps with more specific classes used in the same alternation, such as[\u{1F1E6}-\u{1F1FF}](regional indicator symbols used for flags) and\p{Emoji_Modifier_Base}.When the regex engine attempts to match a string that almost matches but ultimately fails (like the one in the PoC), this ambiguity forces it to explore an exponential number of possible paths. The matching time increases exponentially with the length of the crafted input, rather than linearly.
PoC
The following code demonstrates the vulnerability.
Impact
Any project using Valibot's
emojivalidation on user-controllable input is vulnerable to a Denial of Service attack.An attacker can block server resources (e.g., a web server's event loop) by submitting a short string to any endpoint that uses this validation. This is particularly dangerous because the attack string is short enough to bypass typical input length restrictions (e.g., maxLength(100)).
Recommended Fix
The root cause is the overlapping character classes. This can be resolved by making the alternatives mutually exclusive, typically by using negative lookaheads (
(?!...)) to subtract the specific classes from the more general one.The following modified
EMOJI_REGEXapplies this principle:Release Notes
open-circle/valibot (valibot)
v1.2.0Compare Source
Many thanks to @EskiMojo14, @makenowjust, @ysknsid25 and @jacekwilczynski for contributing to this release.
toBigint,toBoolean,toDate,toNumberandtoStringtransformation actions (pull request #1212)examplesaction to add example values to a schema (pull request #1199)getExamplesmethod to extract example values from a schema (pull request #1199)isbnvalidation action to validate ISBN-10 and ISBN-13 strings (pull request #1097)RawCheckAddIssue,RawCheckContext,RawCheckIssueInfo,RawTransformAddIssue,RawTransformContextandRawTransformIssueInfotypes for better developer experience withrawCheckandrawTransformactions (pull request #1359)EMOJI_REGEXused byemojiactionv1.1.0Compare Source
Many thanks to @EltonLobo07, @sacrosanctic, @muningis, @EskiMojo14, @MOZGIII, @vktrl and @jasperteo for contributing to this release.
messagemethod to overwrite local error message configuration of a schema (pull request #1103)summarizemethod to summarize issues into a pretty-printable multi-line string (pull request #1158)getTitle,getDescriptionandgetMetadatamethods to extract metadata of a schema (pull request #1154)minEntriesandmaxEntriesvalidation action to validate number of object entries (pull request #1100)entriesandnotEntriesvalidation action to validate number of object entries (pull request #1156)parseJsonandstringifyJsontransformation action to parse and stringify JSON (pull request #1137)flavortransformation action to flavor the output type of a schema (pull request #950)multipleOfvalidation action (pull request #1164)variantandvariantAsyncschema to improve performance by aborting validation of discriminators early (pull request #1110)NanoIDActionandNanoIDIssueinterface toNanoIdActionandNanoIdIssue(pull request #1171)MarkOptionaltype to fix input and output type of objects in edge cases (issue #1176)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.