{"id":17540,"date":"2021-11-30T13:34:46","date_gmt":"2021-11-30T12:34:46","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=17540"},"modified":"2021-12-30T15:53:01","modified_gmt":"2021-12-30T14:53:01","slug":"usd-2020-0106","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2020-0106\/","title":{"rendered":"usd-2020-0106"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.9.4\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.9.4\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_column type=\"4_4\" _builder_version=\"4.9.4\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.13.1\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2020-0106 (CVE-2021-25273) | Sophos UTM<\/h1>\n<p><span><\/span><br \/><strong>Advisory ID<\/strong><span>: usd-2020-0106<br \/><strong>CVE Number<\/strong>: <a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=2021-25273\" target=\"_blank\" rel=\"noopener\">CVE-2021-25273<\/a><br \/><\/span><span><\/span><strong>Affected Product<\/strong><span>: Sophos UTM<\/span><span><\/span><br \/><strong>Affected Version<\/strong><span>: &lt;\u00a0UTM 9.706<\/span><br \/><strong>Vulnerability Type<\/strong><span>: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')<\/span><br \/><strong>Security Risk<\/strong><span>: Medium<\/span><br \/><strong>Vendor URL<\/strong><span>:\u00a0<\/span><a href=\"https:\/\/sophos.com\" target=\"_blank\" rel=\"noopener\">https:\/\/sophos.com<\/a><br \/><strong>Vendor Status<\/strong><span>: Fixed<\/span><span><\/span><\/p>\n<h3>Description<\/h3>\n<p>Sophos UTM offers a web interface to manage quarantined mails. The web-based interface did not filter user controlled inputs sufficiently, resulting in multiple Cross-Site Scripting (XSS) vulnerabilities.<\/p>\n<p>Sophos UTM is a firewall solution by Sophos. It implements a web interface that allows authenticated users to manage quarantined mails. Additionally, users can inspect the contents of mails.<\/p>\n<p>Sophos UTM fails to sanitize the following contents of mails before reflecting them within the web interface:<\/p>\n<ul>\n<li>subject<\/li>\n<li>filename(s) of attached file(s)<\/li>\n<li>sender's name<\/li>\n<li>mail body (actual contents)<\/li>\n<\/ul>\n<p>As the mails are persistently stored, direct result of this behavior is stored XSS.<\/p>\n<p><span><\/span><\/p>\n<h3>Proof of Concept (PoC)<\/h3>\n<p>1. Send an e-mail that purposely is sent to quarantine by Sophos UTM. This can be for instance achieved by including the <a href=\"https:\/\/en.wikipedia.org\/wiki\/GTUBE\" target=\"_blank\" rel=\"noopener\">\"<b>Generic Test for Unsolicited Bulk Email\" (GTUBE)<\/b><\/a> test string. Additionally, include the following markup:<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"9e260d37-0be2-4a12-a10e-3ed7e27b6ac6\" global_colors_info=\"{}\"]<\/p>\n<p>&lt;iframe src=\"asd\"&gt;<br \/>&lt;img src=\"x:gif\" onerror=\"alert('asd')\"&gt;&lt;\/img&gt;<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.13.1\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" custom_margin=\"||27px||false|false\" global_colors_info=\"{}\"]<\/p>\n<p>2. Access the SMTP quarantine interface and display the detail view of the previously sent mail.<\/p>\n<p>3. Observe that the XSS payload is executed within Sophos UTM's origin.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.13.1\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<div class=\"e16902-22 x-container max width\"><\/div>\n<div class=\"e16902-22 x-container max width\">\n<div class=\"e16902-23 x-column x-sm x-1-1\">\n<h3>Fix<\/h3>\n<p>It is recommended to treat all input on the website as potentially dangerous. Hence, all output that is dynamically generated based on user-controlled data should be encoded according to its context. The majority of programming languages support standard procedures for encoding meta characters. For example, PHP has the built-in function <strong>htmlspecialchars()<\/strong>.<\/p>\n<p>Additionally, all input should be validated on the server-side. Where possible, whitelist filters should be used. The more restrictive a filter can be specified, the better the protection it provides. Whitelisting is especially recommended if input values have a well defined format or a list of valid input values exists. Invalid values should not be sanitized and forwarded to the application. Instead, requests with invalid values should be rejected.<\/p>\n<p>Further details on how to prevent XSS vulnerabilities can be obtained from <a href=\"https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/cross_Site_Scripting_Prevention_Cheat_Sheet.html\" target=\"_blank\" rel=\"noopener\">OWASP<\/a>.<\/p>\n<h3><\/h3>\n<h3>References<\/h3>\n<ul>\n<li><a href=\"https:\/\/owasp.org\/www-community\/attacks\/xss\/\" target=\"_blank\" rel=\"noopener\">https:\/\/owasp.org\/www-community\/attacks\/xss\/<\/a><\/li>\n<li><a href=\"https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/cross_Site_Scripting_Prevention_Cheat_Sheet.html\" target=\"_blank\" rel=\"noopener\">https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/cross_Site_Scripting_Prevention_Cheat_Sheet.html<\/a><\/li>\n<\/ul>\n<h3><\/h3>\n<h3>Timeline<\/h3>\n<ul>\n<li>2020-10-07: Vulnerability reported by Daniel Hoffmann \/ Advisory created.<\/li>\n<li>2020-12-09: Sophos is not able to reproduce the reported issue.<\/li>\n<li>2021-02-02: We are finally able to reproduce the issue again and provide further information.<\/li>\n<li>2021-02-03: Sophos acknowledges that they were also able to reproduce the issue and are working on a fix.<\/li>\n<li>2021-05-03: Security advisory and update published by Sophos with <a href=\"https:\/\/community.sophos.com\/utm-firewall\/b\/blog\/posts\/utm-up2date-9-706-released\" target=\"_blank\" rel=\"noopener\">UTM Up2Date 9.706<\/a>.<\/li>\n<li>2021-11-30: Security advisory released by usd AG.<\/li>\n<\/ul>\n<h3><\/h3>\n<h3>Credits<\/h3>\n<p>This security vulnerability was found by Daniel Hoffmann of usd AG.<\/p>\n<\/div>\n<\/div>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2020-0106 (CVE-2021-25273) | Sophos UTM Advisory ID: usd-2020-0106CVE Number: CVE-2021-25273Affected Product: Sophos UTMAffected Version: &lt;\u00a0UTM 9.706Vulnerability Type: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')Security Risk: MediumVendor URL:\u00a0https:\/\/sophos.comVendor Status: Fixed Description Sophos UTM offers a web interface to manage quarantined mails. The web-based interface did not filter user controlled inputs sufficiently, resulting [&hellip;]<\/p>\n","protected":false},"author":96,"featured_media":0,"parent":16124,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"footnotes":""},"class_list":["post-17540","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/17540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/users\/96"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=17540"}],"version-history":[{"count":0,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/17540\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16124"}],"wp:attachment":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/media?parent=17540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}