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.
-
Do not execute scripts from external storage; keep executable code inside the app package.
Seen in 1 report
-
Do not export receivers that forward strings into a process builder, and do not run the app under the system shared user ID.
Seen in 1 report
-
Do not expose internal methods via XMLRPC, and sanitise user-controlled input used in eval or require statements.
Seen in 1 report
-
Do not expose powerful main-process APIs to renderer content.
Seen in 1 report
-
Do not expose servlet context and Spring beans to templates that can be modified by attackers.
Seen in 1 report
-
Do not fall back to an unencrypted protocol when downloading critical components.
-
Do not generate device passwords from publicly visible identifiers.
Seen in 1 report
-
Do not guard input validation behind a condition on another parameter; validate the value unconditionally.
-
Do not include sensitive objects in serialised responses and bind agent identity to the requested ID.
Seen in 1 report
-
Do not interpolate JSON fields into shell commands run through a shell interpreter.
-
Do not invoke ExifTool on user-supplied files before authentication, and update the bundled ExifTool version.
Seen in 1 report
-
Do not let a parameter name an arbitrary executable to run on reset.
-
Do not load pickle files from untrusted sources, or restrict the opcodes that can be executed.
Seen in 1 report
-
Do not mount service account tokens that are readable by the container user.
Seen in 1 report
-
Do not parse untrusted output for logging commands, or escape logging command syntax in output.
Seen in 1 report
-
Do not pass sound filenames directly as command-line arguments to the media player.
Seen in 1 report
-
Do not pass unvalidated user-supplied strings into system calls.
Seen in 1 report
-
Do not pass user input into template engines without sanitisation or sandboxing.
Seen in 1 report
-
Do not pass user input to eval; use a safe parser.
Seen in 1 report
-
Do not pass user-controlled YAML to a reader that instantiates arbitrary classes.
Seen in 1 report
-
Do not pass user-supplied strings to dynamic function dispatchers.
-
Do not place uploaded filenames directly into shell command strings; escape or validate them.
-
Do not rely on a hostname whitelist that includes names that may be resolved via DNS.
Seen in 1 report
-
Do not rely on a sandbox that can be escaped to validate user-supplied JavaScript.
-
Do not run package lifecycle scripts on user-supplied manifests, or run them in an isolated environment.
Seen in 1 report
-
Do not ship static JWT signing secrets in default deployments; generate unique secrets per install.
Seen in 1 report
-
Do not trust client-supplied action properties and writable temp paths; verify the actual file being executed.
Seen in 1 report
-
Do not use shell enabled in subprocess calls; pass arguments as a list.
Seen in 1 report
-
Download binaries over HTTPS and verify checksums or GPG signatures before executing with sudo.
-
Enable JMX authentication and SSL, and restrict firewall access to the JMX port.
Seen in 1 report
-
$3,134
-
-
Enable ViewState encryption and use a unique, properly generated machine key.
Seen in 1 report
-
Encode account names before rendering them in emails.
-
Encode HTML characters in review bodies before rendering.
Seen in 1 report
-
Enforce authentication before executing any admin page code.
Seen in 1 report
-
$50,000
-
-
Enforce permission checks on server-side features that can run code.
Seen in 1 report
-
Enforce the permission check when setting file capabilities in the outer namespace.
Seen in 1 report
-
Escape all quote characters that the target parser treats as delimiters, not just ASCII quotes.
-
Escape every argument on the Windows code path as the Linux path does.
-
Escape markup in consent prompts so tool arguments are shown literally.
-
Escape or validate request parameters before concatenating them into shell command strings.
-
Escape shell arguments built from user-controlled upload destination names.
Seen in 1 report
-
Escape special characters before writing them to log files.
-
Escape the hostname before passing it to a system call.
Seen in 1 report
-
Escape the period in the regular expression used to validate domain and client names.
Seen in 1 report
-
Escape the soft hyphen character in the CGI handler and avoid best-fit Unicode mapping of query strings.
Seen in 1 report
-
Exit after sending a redirect so later code does not evaluate user-supplied input.
Seen in 1 report
-
Fetch updates over HTTPS from a controlled domain and verify a signature before executing.
Seen in 1 report
-
Fix prototype pollution in DatabaseController.js.
Seen in 1 report
-
Fix the boolean logic in the setup page's access check so that providing any Action parameter does not bypass authentication.
Seen in 1 report
-
Fix the hash decoding function so leading spaces do not cause the hash to be skipped.
Seen in 1 report