New commit status API doesn't check permissions properly #9213

Closed
opened 2025-11-02 08:32:20 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @leytilera on GitHub (Jul 12, 2022).

Description

Using the Gitea API it is currrently possible with the new commit status endpoint to add a commit status to a repository, even if you don't have write access to that repository. This function does not check, if the user has access to the repository.

Gitea Version

from 1.16.8 to 1.18.0+dev-90-gc8e0fd0bc

Can you reproduce the bug on the Gitea demo site?

Yes

Originally created by @leytilera on GitHub (Jul 12, 2022). ## Description Using the Gitea API it is currrently possible with the new commit status endpoint to add a commit status to a repository, even if you don't have write access to that repository. [This function](https://github.com/go-gitea/gitea/blob/main/routers/api/v1/repo/status.go#L21) does not check, if the user has access to the repository. ## Gitea Version from 1.16.8 to 1.18.0+dev-90-gc8e0fd0bc ## Can you reproduce the bug on the Gitea demo site? Yes
GiteaMirror added the type/bug label 2025-11-02 08:32:20 -06:00
Author
Owner

@zeripath commented on GitHub (Jul 12, 2022):

Thank you for reporting this, but in future please report issues like this directly to security@gitea.io .

NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue.

By opening a public issue like this you've advertised this issue to everyone reading the bug tracker before we have had a chance to fix this or release a fixed version.

@zeripath commented on GitHub (Jul 12, 2022): Thank you for reporting this, but in future please report issues like this directly to security@gitea.io . > NOTE: If your issue is a security concern, please send an email to [security@gitea.io](mailto:security@gitea.io) instead of opening a public issue. By opening a public issue like this you've advertised this issue to everyone reading the bug tracker before we have had a chance to fix this or release a fixed version.
Author
Owner

@6543 commented on GitHub (Jul 12, 2022):

@leytilera **PLEASE follow SECURITY.md next time

& thanks for reporting

@6543 commented on GitHub (Jul 12, 2022): @leytilera **PLEASE follow [SECURITY.md](https://github.com/go-gitea/gitea/blob/main/SECURITY.md) next time & thanks for reporting
Author
Owner

@6543 commented on GitHub (Jul 12, 2022):

also would you like to be mentioned in the https://blog.gitea.io ?

@6543 commented on GitHub (Jul 12, 2022): also would you like to be mentioned in the https://blog.gitea.io ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9213