Skip to content

Update MessagePack to 3.1.9 to address security advisories - #47

Open
cheerfulnut wants to merge 1 commit into
codengine:masterfrom
cheerfulnut:fix/messagepack-advisories
Open

cheerfulnut wants to merge 1 commit into
codengine:masterfrom
cheerfulnut:fix/messagepack-advisories

Conversation

@cheerfulnut

Copy link
Copy Markdown

Hi again - this is the follow-up PR I mentioned in #46. Keeping it separate since it's unrelated to the .Net10 change, and this one is based on master so it should merge fine either way.

When I ran dotnet restore, it flagged a bunch of security warnings against MessagePack 3.1.4. They're all covered by advisories affecting >= 3.0, < 3.1.7, fixed in 3.1.7, with two rated high:

GHSA-vh6j-jc39-fggf - MessagePackReader.Skip can recurse without enforcing max object graph depth
GHSA-382j-8mxh-c7x2 - DoS via stack and heap overflows

From what CC tells me this is relevant here because CompanionMessageHandler deserializes messages coming in over the websocket from the Companion mod. Again I'm not a dev so I may be overstating it, but it seemed worth flagging either way.

What changed: MessagePack 3.1.4 → 3.1.9 in SOTFEdit.Companion.Shared.csproj. One line.
Tested: build goes from 60 warnings to 0, and all 27 tests pass including the Companion.Shared round-trip ones.
Not verified: the actual Companion mod integration, since I don't have the mod installed.

🤖 Generated with Claude Code

MessagePack 3.1.4 is affected by advisories covering >= 3.0, < 3.1.7,
patched in 3.1.7. Two are rated high severity:

- GHSA-vh6j-jc39-fggf: MessagePackReader.Skip can recurse without
  enforcing maximum object graph depth
- GHSA-382j-8mxh-c7x2: DoS via stack and heap overflows

CompanionMessageHandler deserializes ICompanionMessage from websocket
data, which is the input path these advisories describe.

This clears all NU1902/NU1903 warnings from dotnet restore.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cheerfulnut

Copy link
Copy Markdown
Author

FYI CI on this one will fail at the Setup .NET step, but it's nothing to do with the MessagePack change. It's the pre-existing global.json issue on master I mentioned in #46 (setup-dotnet needs a full SDK version when rollForward is set). Merging #46 first would clear it, or it needs the same one-line fix here.

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.

1 participant