-
Notifications
You must be signed in to change notification settings - Fork 47
[Security P0] Remote Code Execution via TypeNameHandling.Auto deserialization #346
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingsecuritySecurity-related issueSecurity-related issuesquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a membersquad:riverAssigned to River (Backend Dev)Assigned to River (Backend Dev)
Description
Summary
Newtonsoft.Json TypeNameHandling.Auto is used in 4 locations across the plugin/configuration system. This is a well-documented Remote Code Execution (RCE) deserialization vulnerability.
Affected Files
| File | Lines |
|---|---|
src/SharpSite.Web/ApplicationState.cs |
130-134, 212-216 |
src/SharpSite.Web/SharpsiteConfigurationExtensions.cs |
13-17, 19-25 |
Risk
If an attacker can write to the plugins directory, they can achieve full RCE via known Newtonsoft.Json gadget chains.
Recommended Fix
Replace with System.Text.Json polymorphic serialization, or implement a strict ISerializationBinder type whitelist.
Estimated Effort
2-4 hours. Blocks production readiness of the plugin system.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingsecuritySecurity-related issueSecurity-related issuesquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a membersquad:riverAssigned to River (Backend Dev)Assigned to River (Backend Dev)