Several endpoints that work on both issues and pull requests did not check which of the two the addressed item is.
Vulnerabilities
19 records
Gitea lets former writers delete release assets
The web endpoint that removes an attachment skipped the permission check when the request came from the user who had uploaded the attachment, and it was reachable with read access to issues or pull requests.
Git over HTTP lowers the required permission for pushes to read access, so that the AGit flow works, and relies on the repository's server-side hooks to enforce write access.
Removing a team's review request looked up a review by the negated team ID, which for the team with ID 2 is the ID of the built-in Actions user, and marked the review it found as official.
When Gitea acts as an OAuth2 or OpenID Connect provider, the token endpoint did not check the state of the user.
A pull request review created through the API as a draft (`event` set to `PENDING` or left empty) was added to the pull request timeline and announced through notifications and activity feeds like a submitted review.
Replying to a code review comment accepted a review ID that belongs to a different pull request, through the web form, the API and incoming mail replies.
`GET /api/v1/users/{username}/orgs/{org}/permissions` only checked that the organization is visible to the caller and then returned the named user's role in it.
Gitea lets users without pull request access open pull requests via AGit
The AGit flow (pushing to `refs/for/...`) did not check the pusher's access to pull requests again when it created the pull request.
The "Protected file patterns" setting of a branch protection rule was checked against file names as git prints them, and git quotes names that contain a double quote, a backslash or a control character.
When a release was edited, the files of the attachments to remove were deleted by the identifiers submitted in the form rather than by the attachments verified to belong to the release.
When a file is edited in a fork through the web editor, Gitea can first copy a branch from the base repository into the fork.
Gitea missing attempt limit for TOTP passcodes
Gitea accepted an unlimited number of wrong TOTP passcodes during sign-in, in the password reset flow and for Basic authentication with the `X-Gitea-OTP` header.
When a container blob upload was rejected, for example because it exceeded a package size quota, the cleanup removed the blob from storage even if the same content already existed and was used by other packages.
The popup shown when hovering an issue reference loaded its data from the path of the hovered link and inserted part of the response as HTML.
Gitea exposes Git LFS objects to anonymous users despite required sign-in
With `REQUIRE_SIGNIN_VIEW = true`, the Git LFS endpoints still answered unauthenticated requests for repositories that are not private.
A repository registered by its owner as a source of scoped workflows kept that registration when it was transferred to another owner.
A repository created with auto-init accepted pushes before its initialization had finished, and the initial commit was built in a checkout of whatever the repository already contained.
Password hash disclosure in Gitea repository search
The repository search used by the dashboard (`GET /repo/search`) returned the internal commit status object of each repository.