Repository navigation
Update dependency json to v2.19.9 [SECURITY] - #191
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
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:
2.19.1→2.19.9Ruby JSON has a format string injection vulnerability
CVE-2026-33210 / GHSA-3m6g-2423-7cp3
More information
Details
Impact
A format string injection vulnerability than that lead to denial of service attacks or information disclosure, when the
allow_duplicate_key: falseparsing option is used to parse user supplied documents.This option isn't the default, if you didn't opt-in to use it, you are not impacted.
Patches
Patched in
2.19.2.Workarounds
The issue can be avoided by not using the
allow_duplicate_key: falseparsing option.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Ruby json: JSON generator heap buffer overflow when streaming to an IO
CVE-2026-54696 / GHSA-x2f5-4prf-w687
More information
Details
Summary
JSON.dump(obj, io)andJSON::State#generate(obj, io)can write past theinternal JSON generator buffer when a streamed object contains an
attacker-controlled string near 16 KB. The issue is a heap out-of-bounds write
in the IO-streaming path and is demonstrated as a reliable process crash /
denial of service.
This was triaged on HackerOne as report #3785370. The issue was confirmed there
and I was asked to open it here.
Details
Root cause is in
ext/json/fbuffer/fbuffer.h,fbuffer_do_inc_capa().On the IO path, the buffer is grown to
FBUFFER_IO_BUFFER_SIZE(16383), but theearly return checks total capacity instead of remaining capacity:
If
fb->lenalready contains JSON syntax bytes, and a string flush has16383 - fb->len <= requested < 16383, this check returns even though there isnot enough space left.
fbuffer_append_reserved()then writes past the buffer:The minimal fix is to compare against the remaining capacity:
PoC
Verified results:
Control: the same data through
JSON.dump([big])without an IO argument returnsnormally. The bug is specific to the IO-streaming path.
Impact
A remote attacker can trigger a heap out-of-bounds write if they control a
string field that an application serializes through
JSON.dump(obj, io)orJSON::State#generate(obj, io). The demonstrated impact is reliable denial ofservice. I am not claiming code execution or information disclosure.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
ruby/json (json)
v2.19.9Compare Source
with
JSON.generate(object, io). [CVE-2026-54696].v2.19.8Compare Source
max_nestingoption.v2.19.7Compare Source
JSON.parsecan't be mutated during parsing.State#dup.depthconfig.v2.19.6Compare Source
depthgenerator argument.ParserConfig.v2.19.5Compare Source
v2.19.4Compare Source
0.0orInf).v2.19.3Compare Source
v2.19.2Compare Source
JSON.parse(doc, allow_duplicate_key: false).CVE-2026-33210.Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.