Skip to content

fix(deps): update dependency valibot to v1 [security] - #52

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-valibot-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-valibot-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
valibot (source) ^0.19.0 → ^1.0.0 age confidence

Valibot: record() issue paths can make flatten() throw for inherited Object property names

CVE-2026-59952 / GHSA-5qjj-4xww-7phc

More information

Details

Summary

valibot 1.4.1 can throw a TypeError inside its flatten() helper when validation issues contain attacker-controlled object keys such as toString, valueOf, or hasOwnProperty.

The issue is reachable through normal record() validation. record() intentionally filters __proto__, prototype, and constructor, but it still accepts other own keys that collide with inherited Object.prototype properties. If the record key schema or value schema rejects such an entry, Valibot creates an issue path containing that key. Passing the resulting issues to Valibot's documented flatten() helper causes flatErrors.nested[dotPath] to resolve to the inherited method instead of an own error array, and the helper calls .push(...) on that function.

This is not a global prototype pollution issue. The impact is availability/error handling: applications that validate user-controlled objects with record() and flatten validation errors for API responses can crash the request path with a TypeError instead of returning structured validation errors.

Affected package
  • Ecosystem: npm
  • Package: valibot
  • Affected version verified: 1.4.1
  • Fixed version: none known
  • Repository: open-circle/valibot
  • Current main ref tested by source review: 9bb6617
Root cause

record() uses _isValidObjectKey() before validating record entries. The helper blocks the three classic prototype pollution keys:

key !== '__proto__' &&
key !== 'prototype' &&
key !== 'constructor'

It does not block other inherited Object.prototype names such as toString, valueOf, and hasOwnProperty. These remain valid own JSON object keys and can appear in issue paths when either the record key schema or value schema rejects the entry.

flatten() then creates nested error storage with an ordinary object:

flatErrors.nested = {};

For a dot path such as toString, this check reads the inherited Object.prototype.toString function:

if (flatErrors.nested![dotPath]) {
  flatErrors.nested![dotPath]!.push(issue.message);
}

Because the inherited function is truthy, flatten() calls .push(...) on a function and throws TypeError: flatErrors.nested[dotPath].push is not a function.

Impact

A remote attacker can trigger this if an application:

  1. validates attacker-controlled JSON objects with v.record(...);
  2. receives an invalid key or invalid value under a key such as toString;
  3. uses Valibot's flatten(result.issues) helper to prepare validation errors.

This is a common pattern in API/form validation: safeParse() collects issues and flatten() converts them into response-friendly error objects. Instead of a validation response, the request can hit an unexpected exception path.

The same root cause can also affect manually constructed issues or other schemas that place inherited Object property names into dot paths. I am reporting the record() path because it uses only public Valibot APIs and attacker-controlled JSON keys.

Local reproduction

Run in a disposable directory:

npm install valibot@1.4.1
node poc_record_flatten_inherited_key_dos.mjs

Minimal example:

import * as v from 'valibot';

const schema = v.record(v.string(), v.number());
const input = JSON.parse('{"toString":"not-a-number"}');

const result = v.safeParse(schema, input);
console.log(result.success); // false
console.log(result.issues[0].path.map((item) => item.key)); // ["toString"]

v.flatten(result.issues); // TypeError

Observed output from valibot@1.4.1:

{
  "name": "record value schema rejects attacker-controlled value",
  "key": "toString",
  "success": false,
  "issueCount": 1,
  "firstPath": ["toString"],
  "firstMessage": "Invalid type: Expected number but received \"not-a-number\"",
  "flattened": {
    "ok": false,
    "exception": "TypeError",
    "message": "flatErrors.nested[dotPath].push is not a function"
  }
}

The local PoC also reproduces the same exception for valueOf, hasOwnProperty, isPrototypeOf, propertyIsEnumerable, and toLocaleString. A control case with an ordinary key produces normal flattened errors.

Duplicate checks performed before submission
  • npm metadata confirmed current valibot release is 1.4.1 and maps to open-circle/valibot.
  • gh api repos/open-circle/valibot/private-vulnerability-reporting returned {"enabled":true}.
  • npm audit for a clean project containing only valibot@1.4.1 returned no vulnerabilities.
  • Repository advisories and the GitHub Advisory Database only returned the historical emoji ReDoS advisory fixed in 1.2.0.
  • OSV exact-version query for npm valibot 1.4.1 returned no vulnerabilities.
  • Public issue/PR searches for flatten toString, flatten hasOwnProperty, record toString, __proto__, constructor, and prototype pollution did not find a matching disclosure of this record() issue-path / flatten() exception.
  • Reviewed related public PRs: open-circle/valibot#67 added prototype pollution mitigation for record() by blacklisting __proto__, prototype, and constructor; it does not cover flatten() collisions with other inherited property names. open-circle/valibot#1429 is an open plain-object / record() type semantics PR and does not disclose this flatten() exception behavior.
Suggested remediation

Use null-prototype containers for flat error maps and/or perform own-property checks before appending:

  • Initialize flatErrors.nested as Object.create(null).
  • Check nested entries with Object.prototype.hasOwnProperty.call(flatErrors.nested, dotPath) rather than truthiness.
  • Consider filtering or escaping unsafe dot path segments in getDotPath() / flatten(), including inherited Object property names.
  • Add regression tests for flatten() with paths toString, valueOf, hasOwnProperty, __proto__, prototype, and constructor.
  • Consider using the same hardening for other accumulator objects that store attacker-controlled keys.

Severity

  • CVSS Score: 6.9 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

open-circle/valibot (valibot)

v1.4.2

Compare Source

Many thanks to @​Faze-up and @​chatman-media for contributing to this release.

  • Fix word count actions to cache the Intl.Segmenter for non-primitive locales, preventing it from being recreated on every words, minWords, maxWords and notWords validation (pull request #​1521)
  • Fix flatten method to handle issue path keys that collide with Object.prototype members like toString instead of throwing a TypeError (pull request #​1522)
  • Fix intersect schema to merge object keys that collide with Object.prototype members like toString instead of failing to merge them (pull request #​1522)

v1.4.1

Compare Source

  • Fix intersect schema to infer correct input and output types for non-tuple array options instead of never (pull request #​1478)

v1.4.0

Compare Source

Many thanks to @​ksaurav24, @​heiwen, @​compulim, @​ysknsid25, @​alaycock-stripe, @​IlyaSemenov, @​wszgrcy, @​LMGO, @​yslpn, @​EltonLobo07 and @​Eronmmer for contributing to this release.

Read the release notes on our website for a quick overview of the most exciting new features in this release.

  • Add isoDateTimeSecond validation action to validate ISO date times with seconds (pull request #​1418)
  • Add toCamelCase, toKebabCase, toPascalCase and toSnakeCase transformation actions to convert strings between common naming conventions (pull request #​1457)
  • Change internal ReadonlyOutputKeys and OutputWithReadonly types of object schemas and WithReadonly type of record schemas to improve TypeScript type performance (pull request #​1442)
  • Change hot paths to reduce object allocations and improve runtime performance (pull request #​1437)
  • Change build target to ES2020 so distributed output stays compatible with environments that lack support for newer syntax (pull request #​1455)
  • Change internal _LruCache to use a TypeScript private method instead of a #private class field to avoid runtime helpers in the transpiled output (pull request #​1455)
  • Change internal _isValidObjectKey to use Object.prototype.hasOwnProperty.call instead of Object.hasOwn so the distributed output stays compatible with runtimes that lack the ES2022 Object.hasOwn builtin (pull request #​1421)
  • Change flatten method to accept readonly issue arrays (pull request #​1269)
  • Fix potential RangeError caused by spreading large issue arrays (pull request #​1437)
  • Fix creditCard validation action to reject Mastercard numbers with invalid lengths (pull request #​1462)
  • Fix intersect schema to no longer mutate input values, allowing frozen objects and arrays to be merged (pull request #​1463)

v1.3.1

Compare Source

  • Change MAC48_REGEX, MAC64_REGEX and MAC_REGEX to drop the i flag for better JSON Schema compatibility (pull request #​1430)
  • Change hash action to use case-expanded character classes instead of the i flag (pull request #​1430)

v1.3.0

Compare Source

Many thanks to @​EskiMojo14, @​yslpn, @​alexilyaev, @​idleberg, @​BerkliumBirb and @​frenzzy for contributing to this release.

Read the release notes on our website for a quick overview of the most exciting new features in this release.

  • Add guard transformation action to narrow types using type predicates (pull request #​1204)
  • Add parseBoolean transformation action to parse boolean values from strings and other types (pull request #​1251)
  • Add isrc validation action to validate ISRC codes (pull request #​1373)
  • Add cache method for caching schema output by input (pull request #​1170)
  • Add domain validation action to validate domain names (pull request #​1284)
  • Add jwsCompact validation action to validate JWS compact strings (pull request #​1348)
  • Fix creditCard validation action to allow 13-digit Visa card numbers (pull request #​1347)
  • Fix isoTimestamp validation action to allow optional space before UTC offset for PostgreSQL timestamptz compatibility (pull request #​1195)
  • Fix types for deeply readonly default and fallback values

v1.2.0

Compare Source

Many thanks to @​EskiMojo14, @​makenowjust, @​ysknsid25 and @​jacekwilczynski for contributing to this release.

Read the release notes on our website for a quick overview of the most exciting new features in this release.

  • Add toBigint, toBoolean, toDate, toNumber and toString transformation actions (pull request #​1212)
  • Add examples action to add example values to a schema (pull request #​1199)
  • Add getExamples method to extract example values from a schema (pull request #​1199)
  • Add isbn validation action to validate ISBN-10 and ISBN-13 strings (pull request #​1097)
  • Add exports for RawCheckAddIssue, RawCheckContext, RawCheckIssueInfo, RawTransformAddIssue, RawTransformContext and RawTransformIssueInfo types for better developer experience with rawCheck and rawTransform actions (pull request #​1359)
  • Change build step to tsdown
  • Fix ReDoS vulnerability in EMOJI_REGEX used by emoji action

v1.1.0

Compare Source

Many thanks to @​EltonLobo07, @​sacrosanctic, @​muningis, @​EskiMojo14, @​MOZGIII, @​vktrl and @​jasperteo for contributing to this release.

Read the release notes on our website for a quick overview of the most exciting new features in this release.

  • Add message method to overwrite local error message configuration of a schema (pull request #​1103)
  • Add summarize method to summarize issues into a pretty-printable multi-line string (pull request #​1158)
  • Add getTitle, getDescription and getMetadata methods to extract metadata of a schema (pull request #​1154)
  • Add minEntries and maxEntries validation action to validate number of object entries (pull request #​1100)
  • Add entries and notEntries validation action to validate number of object entries (pull request #​1156)
  • Add parseJson and stringifyJson transformation action to parse and stringify JSON (pull request #​1137)
  • Add flavor transformation action to flavor the output type of a schema (pull request #​950)
  • Add support for bigints to multipleOf validation action (pull request #​1164)
  • Change implementation of variant and variantAsync schema to improve performance by aborting validation of discriminators early (pull request #​1110)
  • Change name of NanoIDAction and NanoIDIssue interface to NanoIdAction and NanoIdIssue (pull request #​1171)
  • Fix internal MarkOptional type to fix input and output type of objects in edge cases (issue #​1176)

v1.0.0

Compare Source

This is a summary of the changes between v0 and v1. Many thanks to everyone who contributed to this release.

  • Add assert method to assert values (issue #​862)
  • Add checkItemsAsync action (pull request #​856)
  • Add graphemes, maxGraphemes, minGraphemes and notGraphemes action (pull request #​853)
  • Add words, maxWords, minWords and notWords action
  • Add args and returns action to transform functions (issue #​243)
  • Add rfcEmail action to validate RFC 5322 email addresses (pull request #​912)
  • Add gtValue and ltValue action for greater than and less than validation (pull request #​978, #​985)
  • Add values and notValues action for easier multi-value validation (pull request #​919)
  • Add slug action to validate URL slugs (pull request #​910)
  • Add support for ReadonlyMap and ReadonlySet to readonly action (issue #​1059)
  • Add entriesFromObjects util to improve tree shaking (pull request #​1023)
  • Add new overload signature to pipe and pipeAync method to support unlimited pipe items of same input and output type (issue #​852)
  • Add @__NO_SIDE_EFFECTS__ notation to improve tree shaking (pull request #​995)
  • Add exactOptional and exactOptionalAsync schema (PR #​1013)
  • Change types and implementation to support Standard Schema
  • Change behaviour of minValue and maxValue for NaN (pull request #​843)
  • Change type and behaviour of nullable, nullableAsync, nullish, nullishAsync, optional, optionalAsync, undefinedable and undefinedableAsync for undefined default value (issue #​878)
  • Change type signature of partialCheck and partialCheckAsync action to add .pathList property in a type-safe way
  • Change type signature of findItem action to support type predicates (issue #​867)
  • Change validation of missing object entries in looseObject, looseObjectAsync, object, objectAsync, objectWithRest, objectWithRestAsync, strictObject and strictObject (PR #​1013)
  • Change type signature of optional and optionalAsync when used within an object schema (PR #​1013)
  • Change MarkOptional type to fix order of entries and TS error when using generic schemas (issue #​1021)
  • Change VariantOption and VariantOptionAsync type to fix TS error when using generic schemas (issue #​842)
  • Change implementation of variant and variantAsync to support optional discriminators using exactOptional, exactOptionalAsync, optional, optionalAsync, nullish or nullishAsync
  • Change _addIssue to not ignore empty strings as error message (pull request #​1065)
  • Change ISO_DATE_TIME_REGEX and ISO_TIMESTAMP_REGEX to support space as separator (pull request #​1064)
  • Change pipe tuple of pipe and pipeAsync to be readonly by default
  • Change forward, forwardCheck, partialCheck and partialCheckAsync to improve TypeScript performance (issue #​987)
  • Change DECIMAL_REGEX to support floats that start with a dot (pull request #​1086)
  • Change exports to export only public types to reduce noise
  • Refactor bytes, maxBytes, minBytes and notBytes action
  • Fix implementation of nonOptional, nonOptionalAsync, nonNullable, nonNullableAsync, nonNullish and nonNullishAsync schema in edge cases (issue #​909)
  • Fix instantiation error for any in PathKeys type (issue #​929)
  • Fix TypeScript error of keyof method for objects with many keys (pull request #​988)
  • Fix options filtering in enum_ schema (pull request #​941)
  • Fix partialCheck and partialCheckAsync action for typed data with issues

v0.42.1

Compare Source

  • Fix function type declaration of _run property

v0.42.0

Compare Source

Many thanks to @​ajfhs812, @​andrew-d-jackson and @​declanlscott for contributing to this release.

  • Add metadata action to add custom metadata to a schema
  • Add title metadata action to add a title to a schema (discussion #​826)
  • Add decimal action to validate integer and float strings (pull request #​823)
  • Rename decimal action to digits (pull request #​823)
  • Rename NoPipe type to SchemaWithoutPipe
  • Fix inference of generics in IssueDotPath type (issue #​814)

v0.41.0

Compare Source

Many thanks to @​EltonLobo07, @​ZerNico, @​Andarist, @​ruiaraujo012 and @​merodiro for contributing to this release.

  • Change reference property of all action base types to be less strict (issue #​799)
  • Change implementation of variant and variantAsync to improve performance and issues generation for nested variants with different discriminators (pull request #​809)

v0.40.0

Compare Source

Many thanks to @​jasperteo, @​alecmev and @​cruzdanilo for contributing to this release.

  • Add nanoid action to validate Nano IDs (pull request #​789)
  • Add undefinedable and undefinedableAsync schema (issue #​385)
  • Fix invalid output type for transformed optional object entries (issue #​806)

v0.39.0

Compare Source

Many thanks to @​tpetry, @​incompletude, @​ComradeVanti, @​istonikula and @​ShlokDesai33 for contributing to this release.

  • Add support for exactOptionalPropertyTypes config (issue #​385)
  • Fix IssueDotPath type for pipe and pipeAsync method (issue #​793)
  • Fix IssueDotPath type for variant and variantAsync schema (issue #​700)

v0.38.0

Compare Source

Many thanks to @​EltonLobo07, @​samuba, @​alecmev, @​gflohr, @​threehams and @​carcinocron for contributing to this release.

  • Change expects and expected property by enclosing combined values in parentheses
  • Change question mark handling for optional, optionalAsync, nullish and nullishAsync schemas in objects
  • Fix TypeScript errors in TuplePath and QuestionMarkSchema type (issue #​659, #​776)
  • Fix missing TypeScript errors in pipe and pipeAsync method (pull request #​785)

v0.37.0

Compare Source

Many thanks to @​morinokami, @​xcfox, @​devcaeg, @​shayneo, @​Sandros94, @​slevithan, @​thecotne and @​EltonLobo07 for contributing to this release.

  • Add base64 action to validate Base64 strings (pull request #​644)
  • Add description metadata action (pull request #​747)
  • Add metadata feature to pipe and pipeAsync method (pull request #​747)
  • Refactor HEXADECIMAL_REGEX (pull request #​666)
  • Change unknown[] in LengthInput type to ArrayLike<unknown>
  • Change ArrayInput and ContentInput type to use MaybeReadonly
  • Change EMOJI_REGEX to be more accurate and strict (pull request #​666)
  • Fix bug in fallback and fallbackAsync method for specific schemas (pull request #​752)
  • Fix bug in fallbackAsync method for async schemas (pull request #​732)

v0.36.0

Compare Source

Many thanks to @​N0tExisting, @​ksv90, @​peterbe, @​foster-hangdaan and @​zougari47 for contributing to this release.

  • Add normalize action to normalize strings (issue #​691)
  • Add support for async schemas to entriesFromList util
  • Add support for numbers and symbols to entriesFromList util (issue #​492)
  • Add key property to SetPathItem type to improve DX (issue #​693, #​694)
  • Remove FunctionReference type and refactor code

v0.35.0

Compare Source

Many thanks to @​jindong-zhannng, @​dyljhd and @​TeChn4K for contributing to this release.

  • Increase argument limit of pipe and pipeAsync method to 19 (issue #​643)

v0.34.0

Compare Source

Many thanks to @​Saeris, @​Jimdooz, @​Kenzo-Wada and @​sillvva for contributing to this release.

  • Add file, function and promise schema
  • Add awaitAsync action to await promise in pipeline
  • Add operation property to filterItems, findItem, mapItems, reduceItems and sortItem action
  • Rename action argument of filterItems, findItem, mapItems, reduceItems and sortItem action to operation
  • Rename action argument and property of transform and transformAsync action to operation
  • Change and improve implementation of _stringify util

v0.33.3

Compare Source

Many thanks to @​Demivan for contributing to this release.

  • Fix _isPartiallyTyped util of partialCheck and partialCheckAsync action

v0.33.2

Compare Source

Many thanks to @​allezxandre for contributing to this release.

  • Fix type exports for JSR and Deno (pull request #​663)

v0.33.1

Compare Source

  • Fix types of partialCheck and partialCheckAsync action

v0.33.0

Compare Source

Many thanks to @​Demivan, @​ruiaraujo012, @​Karakatiza666, @​micahjon, @​unlinking, @​demarchenac, @​xsjcTony, @​ziyak97 and @​Lukasz17git for contributing to this release.

  • Add export alias with reserved keywords for functions with underscore suffix
  • Add partialCheck and partialCheckAsync action (issue #​76, #​145, #​260)
  • Add checkItems, filterItems, findItem, mapItems, reduceItems and sortItem action (issue #​595)
  • Rename every and some action to everyItem and someItem
  • Rename _isAllowedObjectKey to _isValidObjectKey and add check for inherited properties
  • Remove RecordPathItem and TuplePathItem type and refactor code
  • Fix received property of issue in date schema for invalid dates (issue #​654)

v0.32.0

Compare Source

Many thanks to @​ruiaraujo012, @​jansedlon, @​ksjitendra18 and @​megacherry for contributing to this release.

  • Add rawCheck, rawCheckAsync, rawTransform and rawTransformAsync action (issue #​597)
  • Change FlatErrors type for better developer experience (discussion #​640)
  • Change pipe and pipeAsync method to mark output as untyped only when necessary (discussion #​613)
  • Remove unused skipPipe option from Config type and refactor library
  • Fix this reference in looseTuple, looseTupleAsync, strictTuple, strictTupleAsync, tuple, tupleAsync, tupleWithRest and tupleWithRestAsync schema (pull request #​649)
  • Fix type of options key in EnumSchema interface

v0.31.1

Compare Source

Many thanks to @​Omochice for contributing to this release.

  • Fix missing file extension for Deno (pull request #​637)

v0.31.0

Compare Source

Many thanks to @​Afsoon, @​AlexXanderGrib, @​Andarist, @​AndreyYolkin, @​ariskemper, @​Demivan, @​DylanThomasFr, @​EltonLobo07, @​GabrielHangor, @​Hugos68, @​IlyaSemenov, @​MohammedEsafi, @​MrGeniusProgrammer, @​Saeris, @​Sandros94, @​Sec-ant, @​alexbit-codemod, @​ammarriq, @​anuraghazra, @​arybitskiy, @​bingtsingw, @​brandonpittman, @​brenelz, @​chertik77, @​chimame, @​christophsturm, @​dboune, @​devcaeg, @​dusty, @​fredericoo, @​gmaxlev, @​homersimpsons, @​jansedlon, @​jchatard, @​joshwashywash, @​jsudelko, @​juliusmarminge, @​kovalchukq, @​linkb15, @​lukemorton, @​macarie, @​morgante, @​mtt-artis, @​mutewinter, @​mxdvl, @​nakanoasaservice, @​naveen-bharathi, @​sacrosanctic, @​samualtnorman, @​saturnonearth, @​seren5240, @​sillvva, @​ssalbdivad, @​vladshcherbin, @​xcfox, @​yudinmaxim, @​znycheporuk and many others for contributing to this release.

To migrate from an older version, please see the official migration guide and our announcement post.

v0.30.0

Compare Source

Many thanks to @​Saeris, @​ariskemper, @​mxdvl, @​romeerez and @​niccholaspage for contributing to this release.

  • Add Default and DefaultAsync type and refactor codebase
  • Add Fallback and FallbackAsync type and refactor codebase
  • Add isOfType type guard util to check the type of an object
  • Refactor getDefaults and getDefaultsAsync method (pull request #​259)
  • Refactor getFallbacks and getFallbacksAsync method (pull request #​259)
  • Change type definitions from type to interface (pull request #​259, #​451)
  • Remove deprecated properties of safeParse and safeParseAsync method
  • Remove any deprecated method, schema and validation functions
  • Fix NestedPath type of flatten for async schemas (issue #​456)
  • Fix implementation of DefaultValue type for transformed values

v0.29.0

Compare Source

Many thanks to @​Mini-ghost, @​ivands and @​Demivan for contributing to this release.

  • Add every and some pipeline validation action
  • Add input of schema to getter function of recursive and recursiveAsync schema (pull request #​441)
  • Change implementation of transform and transformAsync method to only run transformations if there are no issues (issue #​436)
  • Rename recursive and recursiveAsync schema to lazy and lazyAsync (issue #​440)
  • Fix bug in i18n util when using setSchemaMessage

v0.28.1

Compare Source

Many thanks to @​compulim for contributing to this release.

  • Fix bug in union and unionAsync schema for transformed inputs (issue #​420)

v0.28.0

Compare Source

Many thanks to @​LorisSigrist, @​samuelstroschein, @​gmaxlev, @​thundermiracle, @​ivanhofer, @​CanRau, @​zkulbeda, @​lucaschultz, @​paoloricciuti, @​hyunbinseo, and @​bertez for contributing to this release.

Note: The library has been revised and refactored. Therefore, not every change is listed in detail.

  • Add i18n feature, global configurations and improve error messages (pull request #​397)
  • Add number and bigint to PicklistOptions type (issue #​378)
  • Fix missing export of forwardAsync method (issue #​412)

v0.27.1

Compare Source

Many thanks to @​Omochice for contributing to this release.

  • Fix missing file extension for Deno (pull request #​387)

v0.27.0

Compare Source

Many thanks to @​pschiffmann for contributing to this release.

  • Remove NonNullable, NonNullish and NonOptional type
  • Add NonNullableInput, NonNullableOutput, NonNullishInput, NonNullishOutput, NonOptionalInput and NonOptionalOutput type
  • Improve type signature of omit, omitAsync, pick and pickAsync schema to also allow read-only object keys (issue #​380)
  • Fix type of pipe argument at intersect and intersectAsync schema

v0.26.0

Compare Source

Many thanks to @​WtfJoke, @​dboune, @​alexabw and @​aypotu for contributing to this release.

  • Improve performance of enum_ and enumAsync schema by caching values
  • Change ISO timestamp regex to support timestamps with lower and higher millisecond accuracy (pull request #​353)
  • Change issue handling of union, unionAsync, variant and variantAsync schema to improve developer experience
  • Fix bug in getDefaults, getDefaultsAsync, getFallbacks and getFallbacksAsync schema for falsy but not undefined values (issue #​356)
  • Fix type of pipe argument at union, unionAsync, variant and variantAsync schema
  • Fix bug that broke pipeline execution in union, unionAsync, variant and variantAsync schema (issue #​364)
  • Fix typo in type name of startsWith validation action (pull request #​375)

Migration guide

The changes in union, unionAsync, variant and variantAsync are breaking changes and may result in different behavior when returning issues. Please create an issue if you have questions about this.

import * as v from 'valibot';

// Change this
const UnionSchema = v.union(
  [v.string([v.email()]), v.literal('')],
  'Not a valid email'
);

// To that
const UnionSchema = v.union([
  v.string([v.email('Not a valid email')]),
  v.literal(''),
]);

v0.25.0

Compare Source

Many thanks to @​ariskemper, @​ewautr, @​cuberoot @​lo1tuma and @​richardvanbergen for contributing to this release.

  • Add creditCard, decimal, hash, hexadecimal, hexColor and octal pipeline validation action (pull request #​292, #​304, #​307, #​308, #​309)
  • Add pipe parameter to intersect, intersectAsync, union, unionAsync, variant and variantAsync schema (discussion #​297)
  • Add support for multiple variant options with same discriminator key to variant and variantAsync schema (issue #​310)
  • Add path to issues if discriminator key of variant and variantAsync schema is missing (issue #​235, #​303)
  • Change PicklistOptions type and generics of picklist and picklistAsync schema

v0.24.1

Compare Source

Many thanks to @​NotWorkingCode for contributing to this release.

  • Fix output type of optional object and objectAsync entries with default value (issue #​286)
  • Fix output type of nullable, nullableAsync, nullish, nullishAsync, optional and optionalAsync schema with default value (issue #​286)

v0.24.0

Compare Source

Many thanks to @​genki and @​NotWorkingCode for contributing to this release.

  • Add support for special schema as key of record schema (issue #​291)
  • Add support for special and specialAsync schema as key of recordAsync schema (issue #​291)
  • Fix input and output type of optional object keys with default value (issue #​286)

v0.23.0

Compare Source

Many thanks to @​ariskemper, @​ivands and @​emilgpa for contributing to this release.

  • Add bic validation function (pull request #​284)
  • Add mac, mac48 and mac64 validation function (pull request #​270)
  • Change PicklistOptions, UnionOptions and UnionOptionsAsync type from tuple to array (issue #​279)
  • Change IntersectOptions, IntersectOptionsAsync, UnionOptions and UnionOptionsAsync type to support readonly values (issue #​279)
  • Fix optional keys of ObjectInput and ObjectOutput type (issue #​242)

v0.22.0

Compare Source

Many thanks to @​ecyrbe, @​Demivan, @​GriefMoDz, @​demarchenac, @​TFX0019, @​AbePlays, @​irg1008, @​skotenko, @​dukeofsoftware, @​xxxhussein, @​JortsEnjoyer0, [@​Karakatiza666](https://redirect.github.com/Karakati

❗ Important

✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested review from a team and sullivanpj October 3, 2026 23:24
@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
Updatedvalibot@​0.19.0 ⏵ 1.5.0100100 +299 +988 +2100

View full report

This branch has not been deployed

No deployments
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.

0 participants