Skip to content

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.

Back to the lesson 151 to 200 of 450
  1. Do not execute scripts from external storage; keep executable code inside the app package.

    Seen in 1 report
  2. 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
  3. Do not expose internal methods via XMLRPC, and sanitise user-controlled input used in eval or require statements.

    Seen in 1 report
  4. Do not expose powerful main-process APIs to renderer content.

    Seen in 1 report
  5. Do not expose servlet context and Spring beans to templates that can be modified by attackers.

    Seen in 1 report
  6. Do not fall back to an unencrypted protocol when downloading critical components.

    Seen in 1 report
  7. Do not generate device passwords from publicly visible identifiers.

    Seen in 1 report
  8. Do not guard input validation behind a condition on another parameter; validate the value unconditionally.

    Seen in 1 report
  9. Do not include sensitive objects in serialised responses and bind agent identity to the requested ID.

    Seen in 1 report
  10. Do not interpolate JSON fields into shell commands run through a shell interpreter.

    Seen in 1 report
  11. Do not invoke ExifTool on user-supplied files before authentication, and update the bundled ExifTool version.

    Seen in 1 report
  12. Do not let a parameter name an arbitrary executable to run on reset.

    Seen in 1 report
  13. Do not load pickle files from untrusted sources, or restrict the opcodes that can be executed.

    Seen in 1 report
  14. Do not mount service account tokens that are readable by the container user.

    Seen in 1 report
  15. Do not parse untrusted output for logging commands, or escape logging command syntax in output.

    Seen in 1 report
  16. Do not pass sound filenames directly as command-line arguments to the media player.

    Seen in 1 report
  17. Do not pass unvalidated user-supplied strings into system calls.

    Seen in 1 report
  18. Do not pass user input into template engines without sanitisation or sandboxing.

    Seen in 1 report
  19. Do not pass user input to eval; use a safe parser.

    Seen in 1 report
  20. Do not pass user-controlled YAML to a reader that instantiates arbitrary classes.

    Seen in 1 report
  21. Do not pass user-supplied strings to dynamic function dispatchers.

    Seen in 1 report
  22. Do not place uploaded filenames directly into shell command strings; escape or validate them.

    Seen in 1 report
  23. Do not rely on a hostname whitelist that includes names that may be resolved via DNS.

    Seen in 1 report
  24. Do not rely on a sandbox that can be escaped to validate user-supplied JavaScript.

    Seen in 1 report
  25. Do not run package lifecycle scripts on user-supplied manifests, or run them in an isolated environment.

    Seen in 1 report
  26. Do not ship static JWT signing secrets in default deployments; generate unique secrets per install.

    Seen in 1 report
  27. Do not trust client-supplied action properties and writable temp paths; verify the actual file being executed.

    Seen in 1 report
  28. Do not use shell enabled in subprocess calls; pass arguments as a list.

    Seen in 1 report
  29. Download binaries over HTTPS and verify checksums or GPG signatures before executing with sudo.

    Seen in 1 report
  30. Enable JMX authentication and SSL, and restrict firewall access to the JMX port.

    Seen in 1 report
  31. Enable ViewState encryption and use a unique, properly generated machine key.

    Seen in 1 report
  32. Encode account names before rendering them in emails.

    Seen in 1 report
  33. Encode HTML characters in review bodies before rendering.

    Seen in 1 report
  34. Enforce authentication before executing any admin page code.

    Seen in 1 report
  35. Enforce permission checks on server-side features that can run code.

    Seen in 1 report
  36. Enforce the permission check when setting file capabilities in the outer namespace.

    Seen in 1 report
  37. Escape all quote characters that the target parser treats as delimiters, not just ASCII quotes.

    Seen in 1 report
  38. Escape every argument on the Windows code path as the Linux path does.

    Seen in 1 report
  39. Escape markup in consent prompts so tool arguments are shown literally.

    Seen in 1 report
  40. Escape or validate request parameters before concatenating them into shell command strings.

    Seen in 1 report
  41. Escape shell arguments built from user-controlled upload destination names.

    Seen in 1 report
  42. Escape special characters before writing them to log files.

    Seen in 1 report
  43. Escape the hostname before passing it to a system call.

    Seen in 1 report
  44. Escape the period in the regular expression used to validate domain and client names.

    Seen in 1 report
  45. Escape the soft hyphen character in the CGI handler and avoid best-fit Unicode mapping of query strings.

    Seen in 1 report
  46. Exit after sending a redirect so later code does not evaluate user-supplied input.

    Seen in 1 report
  47. Fetch updates over HTTPS from a controlled domain and verify a signature before executing.

    Seen in 1 report
  48. Fix prototype pollution in DatabaseController.js.

    Seen in 1 report
  49. 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
  50. Fix the hash decoding function so leading spaces do not cause the hash to be skipped.

    Seen in 1 report