Web application input handling Most web application security vulnerabilities are caused by a lack of secure input handling. As such, it is essential that web applications do not trust any input, such as website addresses and their parameters, Hypertext Markup Language (HTML) form data, cookie values, or request headers, without performing validation or sanitisation. Examples of validation and sanitisation include ensuring a telephone form field contains only numerals, ensuring data used in a Structured Query Language query is sanitised properly and ensuring Unicode input is handled appropriately. Security Control: ISM-1240; Revision: 3; Updated: Mar-22; Applicability: All; Essential Eight: N/A Validation or sanitisation is performed on all input handled by web applications. Web application output encoding The likelihood of cross-site scripting and other content injection attacks can be reduced through the use of output encoding. In particular, output encoding is useful when external data sources, which may not be subject to the same level of input filtering, are output to users. The most common example of output encoding is the conversion of potentially dangerous HTML characters into their encoded equivalents, such as ‘<’, ‘>’ and ‘&’ into ‘&lt;’, ‘&gt;’ and ‘&amp;’. Security Control: ISM-1241; Revision: 4; Updated: Mar-22; Applicability: All; Essential Eight: N/A Output encoding is performed on all output produced by web applications. Web browser-based security controls Web browser-based security controls, such as Content-Security-Policy, Hypertext Transfer Protocol Strict Transport Security (HSTS) and X-Frame-Options, can be used by web applications to help protect themselves and their users. This is achieved via setting security policy in response headers from web applications which web browsers then apply. Note, since the security controls are applied via response headers, they can be applied to legacy or proprietary web applications where changes to their source code may be impractical. Security Control: ISM-1424; Revision: 4; Updated: Mar-22; Applicability: All; Essential Eight: N/A Web applications implement Content-Security-Policy, HSTS and X-Frame-Options via security policy in response headers. Web application event logging Certain web application events can assist in monitoring the security posture of web applications, detecting malicious behaviour and contributing to investigations following cyber security incidents. In doing so, web application event logs should be centrally stored and protected from unauthorised modification and deletion, monitored for signs of compromise, and actioned when cyber security events are detected. Security Control: ISM-1536; Revision: 1; Updated: Mar-22; Applicability: All; Essential Eight: N/A The following events are logged for web applications: attempted access that is denied, crashes and error messages, and search queries initiated by users. Security Control: ISM-1757; Revision: 0; Updated: Mar-22; Applicability: All; Essential Eight: N/A Web application event logs are centrally stored and protected from unauthorised modification and deletion, monitored for signs of compromise, and actioned when cyber security events are detected. Further information Further information on web application security can be found in the OWASP Application Security Verification Standard publication. Further information on implementing HTTPS can be found in the ACSC’s Implementing Certificates, TLS, HTTPS and Opportunistic TLS publication. 103

Select target paragraph3

Connect to a paragraph
Connect to an entity
Disable highlights
Add to table of contents