Skip to content

Release v4.9.9#956

Merged
gummy789j merged 3 commits into
masterfrom
release_v4.9.9
Jul 22, 2026
Merged

Release v4.9.9#956
gummy789j merged 3 commits into
masterfrom
release_v4.9.9

Conversation

@gummy789j

Copy link
Copy Markdown
Collaborator

Bug Fixes

Change

  1. Harden fastjson deserialization by enabling safe mode globally at CLI startup. fastjson 1.x honors the @type hint in JSON.parseObject/parseArray even when the declared target is a JSONObject, which is the entry point for autoType gadget chains. wallet-cli feeds remote HTTP and WebSocket payloads (GasFree, multi-sign) into those calls and never relies on @type itself, so safe mode now rejects the hint outright and removes the remote-code-execution surface. Regression tests cover both the global parser configuration and transaction JSON parsing. (#955)

gummy789j and others added 3 commits July 20, 2026 16:45
fastjson 1.x parses the "@type" hint even when the target is a JSONObject, and
filters it with a deny-list of known gadget classes. wallet-cli feeds untrusted
remote payloads into JSON.parseObject (GasFreeApi, MultiSignService,
MultiTxWebSocketClient) and never relies on "@type" itself, so force safe mode
in Client's static initializer to reject the hint outright. Both the REPL and
the standard CLI funnel through Client.main / runMain, so one static block
covers both.

Defense in depth rather than a patch for a live vulnerability: no published
advisory affects 1.2.83. This matches the default fastjson2 ships with.

Transaction rendering was the compatibility risk, since a Transaction carries
its contract in a protobuf Any. TRON's own JsonFormat prints type_url rather
than "@type", guarded by TransactionJsonSafeModeTest.
@gummy789j
gummy789j merged commit cb62dbe into master Jul 22, 2026
1 check passed
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.

3 participants