{"id":58970,"date":"2024-08-19T18:29:42","date_gmt":"2024-08-19T15:29:42","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/180230\/SYSS-2024-016.txt"},"modified":"2024-08-19T18:29:42","modified_gmt":"2024-08-19T15:29:42","slug":"ewon-cosy-improper-neutralization-cross-site-scripting","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/ewon-cosy-improper-neutralization-cross-site-scripting\/","title":{"rendered":"Ewon Cosy+ Improper Neutralization \/ Cross Site Scripting"},"content":{"rendered":"<p>&#8212;&#8211;BEGIN PGP SIGNED MESSAGE&#8212;&#8211;<br \/>Hash: SHA512<\/p>\n<p>Advisory ID: SYSS-2024-016<br \/>Product: Ewon Cosy+<br \/>Manufacturer: HMS Industrial Networks AB<br \/>Affected Version(s): Firmware Versions: &lt; 21.2s10 and &lt; 22.1s3<br \/>Tested Version(s): Firmware Version: 21.2s7<br \/>Vulnerability Type: Improper Neutralization of Input During Web Page Generation (CWE-79)<br \/>Risk Level: Medium<br \/>Solution Status: Fixed<br \/>Manufacturer Notification: 2024-03-27<br \/>Solution Date: 2024-07-18<br \/>Public Disclosure: 2024-08-11<br \/>CVE Reference: CVE-2024-33893<br \/>Author of Advisory: Moritz Abrell, SySS GmbH<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Overview:<\/p>\n<p>The Ewon Cosy+ is a VPN gateway used for remote access and maintenance<br \/>in industrial environments.<\/p>\n<p>The manufacturer describes the product as follows (see [1]):<\/p>\n<p>&#8220;The Ewon Cosy+ gateway establishes a secure VPN connection between<br \/>the machine (PLC, HMI, or other devices) and the remote engineer.<br \/>The connection happens through Talk2m, a highly secured industrial<br \/>cloud service. The Ewon Cosy+ makes industrial remote access easy<br \/>and secure like never before!&#8221;<\/p>\n<p>Due to improper neutralization of input, an unauthenticated attacker<br \/>is able to inject HTML and JavaScript code into the administrative<br \/>web interface of the device.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Vulnerability Details:<\/p>\n<p>If login against the FTP service of the Cosy+ fails, the submitted<br \/>username is saved in a log.<br \/>This log is included in the Cosy+ web interface without neutralizing<br \/>the content.<br \/>As a result, an unauthenticated attacker is able to inject<br \/>HTML\/JavaScript code via the username of an FTP login attempt.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Proof of Concept (PoC):<\/p>\n<p>1. Login attempt against Cosy+ FTP service:<br \/>#&gt; ftp &#8220;&lt;script src=\/\/x&gt;&#8221;@192.168.10.33<\/p>\n<p>2. JavaScript is included when visiting the event logs on Cosy+ web<br \/>interface (http:\/\/192.168.10.33\/index.shtm#EVLogsTbl):<\/p>\n<p>&lt;div class=&#8221;x-grid-cell-inner &#8221; style=&#8221;text-align:left;&#8221;&gt;<br \/>eftp-Close FTP session (User: &lt;script src=&#8221;\/\/x&#8221;&gt;<br \/>&lt;\/div&#8221;&gt;<\/p>\n<p>Note:<br \/>The FTP username is limited to 16 characters and therefore the<br \/>payload length is limited too.<br \/>However, exploitation is still possible, e.g. by controlling<br \/>DNS responses or using short URLs, e.g. an emoji domain.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Solution:<\/p>\n<p>According to the manufacturer note[4], the vulnerability was fixed<br \/>with the firmware versions 21.2s10 and 22.1s3.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Disclosure Timeline:<\/p>\n<p>2024-03-26: Vulnerability discovered<br \/>2024-03-27: Vulnerability reported to manufacturer<br \/>2024-04-02: Inquiry about the status<br \/>2024-04-05: Manufacturer acknowlegded the vulnerability and started the<br \/>analysis<br \/>2024-04-10: Two more vulnerabilities reported to the manufacturer<br \/>(SYSS-2024-032 and SYSS-2024-033)<br \/>2024-04-11: Manufacturer acknowlegded the vulnerabilities and asked for<br \/>a publication date for all findings<br \/>2024-04-12: Proposed dates for a discussion about publication<br \/>2024-04-15: Manufacturer sent a technical overview of planned remediation<br \/>actions and details about the planned timeline<br \/>2024-04-15: Acknowlegded the remediation actions and asked the manufacturer<br \/>to assign a CVE ID<br \/>2024-04-30: CVE ID CVE-2024-33893[5] assigned by the manufacturer<br \/>2024-05-31: Manufacturer informed that the fix is in completion stage and<br \/>asked if the blog post[6] can be reviewed by HMS<br \/>2024-06-04: Proposed dates to review the blog post draft<br \/>2024-06-21: Inquiry about the status<br \/>2024-06-21: Received an out-of-office auto reply<br \/>2024-07-01: Inquiry about the status<br \/>2024-07-04: Inquiry about the status<br \/>2024-07-12: Inquiry about the status and letting the manufacturer know that<br \/>the vulnerability will be published within a talk at DEF CON[7]in August<br \/>2024-07-12: Manufacturer responded that the fix is planned by the end of<br \/>July; manufacturer asked again for reviewing the blog post<br \/>draft<br \/>2024-07-12: Again confirmed reviewing the blog post is possible and asking<br \/>for the sending of details<br \/>2024-07-17: Blog post provided to HMS<br \/>2024-07-18: Fixed firmware versions 21.2s10 and 22.1s3 released by HMS<br \/>2024-07-23: Inquiry about the status<br \/>2024-07-23: Manufacturer reviewed the blog post and confirmed that a<br \/>fix is provided<br \/>2024-07-29: Discussion with HMS about the blog post and final publication<br \/>actions<br \/>2024-08-11: Vulnerability disclosed at DEF CON[7]2024-08-11: Blog post published[6]\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>References:<\/p>\n[1] Ewon Cosy+ product website<br \/>https:\/\/www.hms-networks.com\/p\/ec71330-00ma-ewon-cosy-ethernet<br \/>[2] SySS Security Advisory SYSS-2024-016<br \/>https:\/\/www.syss.de\/fileadmin\/dokumente\/Publikationen\/Advisories\/SYSS-2024-016.txt<br \/>[3] SySS Responsible Disclosure Policy<br \/>https:\/\/www.syss.de\/en\/responsible-disclosure-policy<br \/>[4] Manufacturer note<br \/>https:\/\/hmsnetworks.blob.core.windows.net\/nlw\/docs\/default-source\/products\/cybersecurity\/security-advisory\/hms-security-advisory-2024-07-29-001&#8211;ewon-several-cosy&#8211;vulnerabilities.pdf<br \/>[5] CVE-2024-33893<br \/>https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-33893<br \/>[6] Blog post<br \/>https:\/\/blog.syss.com\/posts\/hacking-a-secure-industrial-remote-access-gateway\/<br \/>[7] DEF CON talk<br \/>https:\/\/defcon.org\/html\/defcon-32\/dc-32-speakers.html#54521<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Credits:<\/p>\n<p>This security vulnerability was found by Moritz Abrell of SySS GmbH.<\/p>\n<p>E-Mail:moritz.abrell@syss.de<br \/>Public Key:https:\/\/www.syss.de\/fileadmin\/dokumente\/PGPKeys\/Moritz_Abrell.asc<br \/>Key Fingerprint: 2927 7EB6 1A20 0679 79E9 87E6 AE0C 9BF8 F134 8B53<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Disclaimer:<\/p>\n<p>The information provided in this security advisory is provided &#8220;as is&#8221;<br \/>and without warranty of any kind. Details of this security advisory may<br \/>be updated in order to provide as accurate information as possible. The<br \/>latest version of this security advisory is available on the SySS website.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Copyright:<\/p>\n<p>Creative Commons &#8211; Attribution (by) &#8211; Version 3.0<br \/>URL:http:\/\/creativecommons.org\/licenses\/by\/3.0\/deed.en<br \/>&#8212;&#8211;BEGIN PGP SIGNATURE&#8212;&#8211;<\/p>\n<p>iQIzBAEBCgAdFiEEKSd+thogBnl56Yfmrgyb+PE0i1MFAmay4vsACgkQrgyb+PE0<br \/>i1M+GA\/\/R3tvHZW7B21Kf+8aZcVONuL56yzPOyqEdISB0joFi9yvzGkqCJPYws5t<br \/>vFojVlZT38COf64ZC2siFQCJrtOzMa+zWT3kpSeBFsNQ60Sx79UaCdQVa6GjpZm\/<br \/>8qSNWtCpOMGmj95FwYaHuZbKxiSifyIjsVteADqiaysWVx7kXapktPSD2KiOBJSp<br \/>Ycg81WfRS10ELiUWoLZ5GTXhzQKzH0Tsh6h1qNHWy5GkHLwIQKkzicQ5wR1ZRzK4<br \/>o6k8cJySgAqgJ3gmGU9iUUElppPXj7EFOK7m8q0ny5gQpQfz3dMPxJz5eK8zBazd<br \/>1c9OjgdZNcgzschhKsl\/JX+3YVGQzmNo5rSOIbJS4+7Oe0UcTaggzbgj80GGOakT<br \/>vLC9GqmgYUsv+yr2Dp10pUg\/plySeScDhYlkZ+VN9GDcEVodiKzM6wukj1eDEw0+<br \/>6CzHKnGvKOa322AVnKF+xdB\/c+sDCEaD73S47gt8CfG57J7bcpth3Gf9RkLtLFXC<br \/>U3yiT7FmY\/KH7WZvmnyhsk\/Go66aGRy0d1hQl\/tzdnBVdDn1IZToymnC\/YVDxqxc<br \/>Q9GsDhkpDOyozgrhUdef64RY5ZOzXcpNJvCM1RxjP65ZMxiPpZ0z\/3IuGJ+DUWkM<br \/>f8Sm21hfsgkq8UmnLtSnDCUyPTxJISTK9lwleYkqodqJrXUlUD0=<br \/>=HV5Q<br \/>&#8212;&#8211;END PGP SIGNATURE&#8212;&#8211;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8211;BEGIN PGP SIGNED MESSAGE&#8212;&#8211;Hash: SHA512 Advisory ID: SYSS-2024-016Product: Ewon Cosy+Manufacturer: HMS Industrial Networks ABAffected Version(s): Firmware Versions: &lt; 21.2s10 and &lt; 22.1s3Tested Version(s): Firmware Version: 21.2s7Vulnerability Type: Improper Neutralization of Input During Web Page Generation (CWE-79)Risk Level: MediumSolution Status: FixedManufacturer Notification: 2024-03-27Solution Date: 2024-07-18Public Disclosure: 2024-08-11CVE Reference: CVE-2024-33893Author of Advisory: Moritz Abrell, SySS GmbH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-58970","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/58970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=58970"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/58970\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=58970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=58970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=58970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}