Make WordPress Core

#60703 closed defect (bug) (invalid)

Improper Input Validation

Reported by: rakeshchavan's profile rakeshchavan Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.4.3
Component: General Keywords:
Focuses: administration, template, performance, coding-standards Cc:

Description

URL http://demodomain.com/wp-admin/post-new.php
Input validation on the CMS side.
Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a whitelist of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties,
including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs (i.e., do not rely on a blacklist). A blacklist is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, blacklists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

Change History (1)

#1 @swissspidy
21 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi there and welcome to WordPress Trac

Unfortunately your request is not really specific or actionable, as you just pasted the description of CWE-148 without checking if and how it applies to WordPress.

WP usually does validate inputs wherever it makes sense. If you find specific instances where validation is lacking, please open dedicated, specific tickets.

Note: See TracTickets for help on using tickets.