Summary
PowerDocu, a Windows GUI tool for technical documentation, contains an unsafe JSON deserialization vulnerability in how it processes Flow and App package files prior to version 2.4.0.
By abusing the $type property in these JSON files, an attacker can cause the application to instantiate arbitrary .NET objects, which may lead to remote code execution when a malicious package is opened.
Affected context
The vulnerability appears when PowerDocu parses JSON content from Flow or App packages and treats the $type field as trustworthy metadata.
Environments are affected when:
- Users open or import Flow/App packages into PowerDocu
- The JSON parser honors polymorphic type hints (e.g.,
$type) without restriction - Package files can originate from untrusted or semi-trusted sources (e.g., shared repositories, email, collaboration platforms)
The issue is localized to the JSON parsing logic within the application, not to Windows itself.
Exploit preconditions
- Attack surface: Local desktop application (PowerDocu) processing Flow/App package files
- Required access: Ability to deliver a crafted Flow or App package (e.g., sending a file, sharing via repository, or placing it where a user will open it)
- User interaction: A victim must open/import the malicious package in a vulnerable version of PowerDocu
- Trigger point: JSON deserialization of package contents, specifically when reading the
$typeproperty - Why exploitation is possible: The deserializer is configured to trust
$typevalues from JSON input, enabling attacker-controlled selection and instantiation of .NET types, some of which can invoke code during construction or initialization
Why this happens
The core issue is an unsafe deserialization pattern where untrusted JSON data is allowed to control the types instantiated by the application.
By honoring the $type property from input, the deserialization framework is effectively given permission to load and construct arbitrary .NET classes, including those with side effects that can be abused to execute code.
This maps to CWE-502: Deserialization of Untrusted Data, where attacker-controlled serialized data is processed as object graphs, and type resolution is performed without adequate restrictions, validation, or whitelisting.
Potential impact
- Execution of arbitrary code within the security context of the PowerDocu user
- Installation of malware or backdoors on the affected system
- Access to or modification of documents and data handled by PowerDocu
- Lateral movement if the compromised user has access to network resources or shared repositories
- Use of the application as an entry point in a broader supply-chain or phishing campaign
General mitigation guidance
Effective mitigation focuses on eliminating unsafe deserialization behaviors and tightening trust boundaries around package files:
- Avoid enabling polymorphic deserialization that honors type hints (such as
$type) from untrusted JSON input - Prefer data-only models for JSON parsing, mapping directly to known DTOs or strongly-typed structures without dynamic type resolution
- If polymorphism is required, implement a strict type whitelist, limiting deserialization to a small set of explicitly allowed, non-dangerous types
- Enforce validation of JSON structure and fields before deserialization, rejecting unexpected or extraneous metadata like arbitrary
$typevalues - Run desktop applications with least-privilege user accounts and consider additional OS-level protections (e.g., application control, endpoint protection) to reduce post-exploitation impact
How teams detect issues like this
Detection efforts can target both code-level patterns and runtime behaviors:
- Static analysis / code scanning:
- Identify uses of JSON deserializers configured with type name handling or automatic polymorphic resolution (e.g., options that honor
$typefields) - Flag deserialization calls that operate directly on untrusted file input without prior validation or type whitelisting
- Look for reflection-based construction of objects where type names are read from JSON content
- Code review signals:
- Deserialization of Flow/App package JSON with minimal or no schema validation
- Use of global or permissive serialization settings applied across multiple parsing routines
- Lack of a centralized deserialization policy or type whitelist for package formats
- Policy and tooling:
- Incorporate secure-deserialization rules into CI pipelines and pull requests
- Use automated SAST tools that include checks for CWE-502 patterns in .NET applications

