Skip to content

Bump flatted from 3.2.9 to 3.6.1 - #249

Merged
github-actions[bot] merged 1 commit into
mainfrom
dependabot/npm_and_yarn/flatted-3.6.1
Dec 6, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
dependabot/npm_and_yarn/flatted-3.6.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Bumps flatted from 3.2.9 to 3.6.1.

Release notes

Sourced from flatted's releases.

v3.6.1

Go security patch: Parse() no longer recurses while resolving long acyclic reference chains, applying a reviver, or wrapping raw literal input. A shallow depth-2 payload with ~1.8M hops can no longer exhaust the goroutine stack.

  • Fixed GHSA-w3xw-5r53-33f3, patched in 3.6.1.
  • Implemented in #121.
  • Added a 1.8M-hop regression test with and without a reviver.

Go-only patch release: the JavaScript runtime and published JavaScript entry points are unchanged.

Full Changelog: WebReflection/flatted@v3.6.0...v3.6.1

v3.6.0

Rust security fix: deep reference graphs no longer overflow the stack when dropped, revived, or converted by the CLI. to_serde_json() is now depth-bounded. No JavaScript runtime changes.

See #120.

v3.5.0

Highlights

  • Security hardening for the JS and Go parsers
    • parse() no longer recurses over raw literal nesting, so deeply nested input cannot overflow the call stack.
    • Malformed null and out-of-range reference indices no longer crash the JS parser; Go returns an error instead of panicking.
    • The Go reviver now handles cyclic and shared graphs without unbounded recursion.
    • Published advisories: GHSA-2pmx-fqfh-7m9p, GHSA-362p-2g6x-jgj9, GHSA-rpvg-j7px-h4mj, GHSA-437v-hc68-7fcr
  • parse(text, reviver) compatibility restored — revivers receive fully revived nested objects/arrays again, matching the pre-3.4.0 behavior and JSON.parse semantics. Fixes #109.
  • Array-form replacer now matches JSON.stringify — array elements are no longer filtered by index, and numeric entries plus nested empty-string keys are handled correctly. Fixes #106.
  • Official Rust port added — version 0.3.5 of the webreflection-flatted crate lives under rust/ and is included in the npm package. The library/import name remains flatted, so Rust code still uses use flatted::....

Rust

Cargo searches the repository for the requested crate, so the repo root URL is correct even though Cargo.toml lives in rust/.

[dependencies]
webreflection-flatted = { git = "https://github.com/WebReflection/flatted", tag = "0.3.5" }
use flatted::{parse_simple, stringify_simple, Value};

Optional CLI: cargo build --release --features cli.

Thanks

Thanks to everyone who reported, reviewed, and contributed fixes for the parser issues, array replacer behavior, and the Rust port.

Changelog

Sourced from flatted's changelog.

3.6.1

Go security fix

  • Fixed process-aborting stack exhaustion in the Go parser when resolving long acyclic reference chains (GHSA-w3xw-5r53-33f3, #121).
  • Parse() now resolves references, applies the reviver, and wraps raw literal input with explicit stacks instead of recursion. A shallow flatted payload forming a long depth-2 chain can no longer exhaust the goroutine stack.
  • Added a regression covering a 1.8M-hop acyclic chain with and without a reviver.

This is a Go-only patch release: the JavaScript runtime and published JavaScript entry points are unchanged.

3.6.0

Rust security fix

  • Fixed process-aborting stack overflows in the Rust port when handling valid, deeply nested reference graphs (GHSA-543v-p5mr-fvjx, #120).
  • Dropping a parsed Value, running parse() with a reviver, and converting through Value::to_serde_json() (also used by the CLI) now use explicit stacks instead of recursion.
  • Value::to_serde_json() is now bounded by MAX_JSON_DEPTH (512); deeper nesting becomes null, keeping the returned serde_json::Value safe to drop and serialize.
  • Added regressions for dropping deep array and object chains (50,000 levels), reviving a 50,000-level chain, and bounded to_serde_json() output.

Value now implements Drop, so match patterns that previously moved fields out by value need to use ref/borrowing. There are no changes to the JavaScript runtime or the published JavaScript entry points.

3.5.1

Packaging cleanup

  • Moved benchmark-only comparison libraries (@ungap/structured-clone, circular-json, circular-json-es6, flatted-view, jsan) out of the root devDependencies and into test/package.json, where they are installed on demand via npm run bench:install.
  • The root install and dependency graph now cover only build, test, and runtime code: faster installs, fewer transitive packages, and a smaller audit surface.
  • Added npm run bench as the single entry point for benchmarks.
  • Tests now enforce 100% coverage (c8 --100).
  • Updated build and test tooling and pinned patched glob/minimatch versions through overrides to clear vulnerable transitive dependencies.

No API or runtime changes: the published entry points (index.js, es.js, esm.js, min.js, cjs/, esm/) are untouched.

3.5.0

  • Security hardening for the JS and Go parsers: parse() no longer recurses over raw literal nesting, malformed null and out-of-range reference indices are handled safely, and the Go reviver handles cyclic/shared graphs without unbounded recursion.
  • Restored parse(text, reviver) compatibility so revivers receive fully revived nested objects/arrays, matching JSON.parse semantics.
  • Array-form replacer now matches JSON.stringify, without filtering array elements by index.
  • Added the official Rust port: version 0.3.5 of the webreflection-flatted crate, included in the npm package.
Commits
  • 9894752 3.6.1
  • 25bd06a Merge pull request #121 from WebReflection/fix/go-reference-chain-recursion
  • 9cc03dc Fix Go parse stack exhaustion on long reference chains
  • 3e0c840 Merge pull request #97 from WebReflection/test-em-all
  • bca907b Fix CI regression runs on GitHub runners
  • 274b574 Add cross-language regression fixture and timings
  • b4ccc7d Merge branch 'main' into test-em-all
  • 2c47c29 Add changelog with 3.6.0 release notes
  • d4fbf21 3.6.0
  • 9bffda1 3.5.2
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Dec 6, 2026
@github-actions
github-actions Bot enabled auto-merge December 6, 2026 08:27
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/flatted-3.6.1 branch from 9d364c3 to f93e9ad Compare December 6, 2026 08:30
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.2.9 to 3.6.1.
- [Release notes](https://github.com/WebReflection/flatted/releases)
- [Changelog](https://github.com/WebReflection/flatted/blob/main/CHANGELOG.md)
- [Commits](WebReflection/flatted@v3.2.9...v3.6.1)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.6.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/flatted-3.6.1 branch from f93e9ad to b7b6ed1 Compare December 6, 2026 08:34
@github-actions
github-actions Bot merged commit ea0b697 into main Dec 6, 2026
6 checks passed
@github-actions
github-actions Bot deleted the dependabot/npm_and_yarn/flatted-3.6.1 branch December 6, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants