In-depth lesson · RCE
Typical fixes
Every point the RCE reports back under this heading, best-backed first, each with the reports it is seen in.
-
Require user confirmation before activating virtual environments or applying workspace settings from cloned repositories.
Seen in 3 reports
-
Restrict which classes may be instantiated when deserialising.
Seen in 3 reports
-
Restrict which types can be instantiated when deserialising request data.
Seen in 3 reports
-
Validate and restrict the file types inside uploaded archives, and extract into a directory that is not web-accessible.
Seen in 3 reports
-
Validate and sanitise user-supplied strings before passing them to system calls.
Seen in 3 reports
-
Validate file content and extension, and store uploads outside web-accessible directories without execute permission.
Seen in 3 reports
-
Validate parameters and use bounds checking before passing them to system calls.
Seen in 3 reports
-
Validate the structure and type of data in incoming Flight payloads and restrict prototype and constructor references.
Seen in 3 reports
-
Validate untrusted data before deserialising it.
Seen in 3 reports
-
Add access checks to exposed methods.
-
Add access controls to dangerous functions reachable remotely.
-
Bounds-check network-controlled indexes before using them as array indexes.
-
Call external binaries with absolute paths or a safe lookup function.
-
Check binary validity before reading entitlements.
Seen in 2 reports
-
Check that properties being set are the object's own properties before applying them.
-
Claim private package names on public registries and configure package managers to resolve private names only from private sources.
Seen in 2 reports
-
Do not accept serialised objects from the client, and restrict which classes may be reconstructed.
-
Do not deserialise parameters from uploaded files without validation.
-
Do not execute MCP server definitions from workspace-local files without validating the source and asking the user.
-
Do not expose the setup token to unauthenticated users and restrict JDBC parameters passed to the driver.
-
Do not interpolate untrusted commit messages or branch names into shell scripts; pass them through environment variables instead.
-
Do not interpolate untrusted workflow context values into shell commands; pass them through environment variables or validate them.
-
Do not pass user-controlled input directly to a template rendering function.
Seen in 2 reports
-
Do not pass user-supplied strings into Python code execution mechanisms; validate and restrict them.
-
Do not render user-controlled fields through template engines, and restrict log file paths to non-executable locations.
-
Enable context isolation and disable node integration in Electron apps.
-
Escape or prefix cells that begin with formula trigger characters before writing them to a CSV file.
-
Escape regex metacharacters in custom TODO keywords and add range checks in the regex compiler.
-
Escape user-controlled fields when generating CSV output.
Seen in 2 reports
-
Fix the URI safety check logic so unsafe URIs are not treated as safe.
-
Harden expression sanitisers to resolve computed keys and block access to constructors.
Seen in 2 reports
-
Patch runC and BuildKit to close the file descriptor leak and race conditions.
-
Properly escape the sender address to prevent argument injection, avoiding clashes between escapeshellarg() and escapeshellcmd().
Seen in 2 reports
-
Properly identify and filter unsafe ASP.Net web controls.
-
Reserve internal package names on public registries and pin versions.
-
Reserve private dependency names on the public registry or use scoped names.
-
Resolve library paths from trusted fixed locations and sanitise input.
-
Restrict JDBC parameters passed to the driver during setup validation.
-
Sandbox or validate code generated by a large language model before executing it.
-
Sanitise and escape user-supplied input before passing it to a system shell.
-
Sanitise interface and VLAN names before building shell commands.
-
Sanitise user input before embedding it in single-quoted OGNL expressions in Velocity templates, and complete the blocklist of unsafe OGNL elements.
-
Sanitise usernames before passing them to shell scripts.
-
Use an allowlist of permitted file types instead of a blocklist of dangerous extensions.
-
Use safe DLL search settings and validate the origin of loaded DLLs.
-
Validate and sanitise data received from remote performance counter sources.
-
Validate and sanitise the Token and userName parameters before use in a system call.
-
Validate that a backup directory parameter is a safe path before using it in a file operation.
-
Validate the type of user-supplied data before using it in command handlers.
-
Validate user-supplied data before deserialising it.