Skip to content

fix: bump @stellar/stellar-sdk to 17.4.0, drop vulnerable toml dependency - #9

Open
pselle wants to merge 6 commits into
mainfrom
fix/bump-stellar-sdk-drop-toml
Open

pselle wants to merge 6 commits into
mainfrom
fix/bump-stellar-sdk-drop-toml

Conversation

@pselle

@pselle pselle commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Supersedes #7, which failed E2E tests. Fixes #8

Bumps @stellar/stellar-sdk to 17.4.0, the current latest, which drops the vulnerable toml dependency.

🤖 Recommends looking at loadContractMetada.ts narrowing logic and the sorobanUtils.ts ScVal type-hint casts in particular.

E2E now runs the local node on protocol 28 with stellar CLI v28.1.0. This is unrelated to the SDK bump: the current stellar/quickstart:testing image fails to simulate the fixture upload on a node held at protocol 27.

Note: I tried to test this manually but was having trouble figuring out how to use the contract-explorer package in an isolated demo. The Registry UI does some fancy loading strategies, and the explorer isn't (as I'm aware) on the scaffold stellar UI yet stellar-scaffold/ui#274. So I did not test this PR on my own environment/manual testing.

pselle and others added 2 commits September 21, 2026 09:20
…ency

stellar-sdk <=15.1.0 depended on the unmaintained `toml` npm package
(GHSA-82x6-q7mm-w9cf, GHSA-v5mp-jgw5-2x6j — uncontrolled recursion and
prototype pollution, no upstream fix available). The SDK dropped that
dependency entirely at v16.0.0.

Jumping 14.2.0 -> 17.1.0 crosses several xdr API changes: the generated
xdr wrapper classes (ContractDataDurability, ScSpecFunctionV0.name,
Price, Signature, Hash, LedgerEntryData, ScVal, ContractExecutable)
switched from getter *methods* to readonly *properties*, and several
now return Uint8Array where they used to return Buffer. Updated each
call site accordingly, and added explicit type-guard checks where a
union type replaced what used to be a single class with an arm-getter
method (contractData/instance/executable in loadContractMetada.ts).

Verified: typecheck, build, lint, and the full test suite (69 tests)
all pass. `npm audit` confirms `toml` and `@stellar/stellar-sdk` are
gone from the vulnerability list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- ScSpecFunctionV0.name is now a readonly property, not a method
- getContractWasmByContractId now rejects with "Could not obtain
  contract instance from server" instead of "...contract hash..."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Sep 23, 2026 •

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
Updatednpm/​@​stellar/​stellar-sdk@​14.6.1 ⏵ 17.4.099100100 +1100 +2100

View full report

Co-Authored-By: Claude <noreply@anthropic.com>
@pselle pselle changed the title fix: bump @stellar/stellar-sdk to 17.1.0, drop vulnerable toml dependency fix: bump @stellar/stellar-sdk to 17.2.1, drop vulnerable toml dependency Oct 13, 2026
pselle and others added 2 commits October 13, 2026 14:13
The current quickstart testing image fails to simulate the fixture
upload on a node held at protocol 27.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwv7rC3jZoaqcJhPRCzN4a
@pselle pselle changed the title fix: bump @stellar/stellar-sdk to 17.2.1, drop vulnerable toml dependency fix: bump @stellar/stellar-sdk to 17.4.01, drop vulnerable toml dependency Nov 5, 2026
@pselle pselle changed the title fix: bump @stellar/stellar-sdk to 17.4.01, drop vulnerable toml dependency fix: bump @stellar/stellar-sdk to 17.4.0, drop vulnerable toml dependency Nov 5, 2026
@pselle

pselle commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Updated to 17.4.0

stellar/quickstart:latest moved to v690-b1601.1 on 2026-11-03, and that
image fails to simulate the fixture WASM upload with
HostError: Error(Context, InternalError). The last green run used
v678-b1525.1-latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwv7rC3jZoaqcJhPRCzN4a
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.

Upgrade stellar-sdk to 17.x

3 participants