Skip to content

[Security P0] Remote Code Execution via TypeNameHandling.Auto deserialization #346

@csharpfritz

Description

@csharpfritz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecuritySecurity-related issuesquadSquad triage inbox — Lead will assign to a membersquad:riverAssigned to River (Backend Dev)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions