forgejo/modules
Mathieu Fenniak afb5825b73 [v11.0/forgejo] 2025-11-21 combined security patches (#10039)
[CVSS 5.3 Medium](https://www.first.org/cvss/calculator/4-0#CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N) -- The `/repos/{owner}/{repo}/issues/{index}/dependencies` APIs allow a user to link an issue in one repository as "depending upon" an issue in another repository.  Forgejo's implementation had an incorrect permission check which would verify only that the user had write permissions on the issue being modified, and not on the issue it was linking to.  Due to the incorrect permission check, it was possible to view limited information (the existence of, and title of) an issue in a private repository that the user does not have access to view.  The permission check has been corrected to take into account visibility of the remote repository.

[CVSS 5.3 Medium](https://www.first.org/cvss/calculator/4-0#CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N) -- Fetching information about a release via the `/repos/{owner}/{repo}/releases/tag/{tag}` API endpoint did not check whether the release was a draft, allowing accessing to information about a draft release to users who could predict an upcoming release tag but didn't have access to view it.  The missing check has been added, returning a 404 response when the release is not published.

[CVSS 6.3 Medium](https://www.first.org/cvss/calculator/4-0#CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N) -- Forgejo's web interface allows deleting tags on a git repository through a form post.  The endpoint for this form post had misconfigured middleware handlers which enforce security rights, allowing an anonymous user, or a logged-in user without the correct permissions, to delete tags on repositories that they did not own by injecting arbitrary internal tag identifiers into the form.  The middleware handler configuration has been corrected.

[CVSS 2.1 Low](https://www.first.org/cvss/calculator/4-0#CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N) -- When the head branch of a pull request matches a branch protection rule, the head branch should be able to be merged or rebased only according to the "Push" rules defined in the protection rule.  An implementation error checked those branch protection rules in the context of the base repository rather than the head repository, allowing users with write access to the base repository to be considered able to push to the branch, bypassing the "Enable push" option's expected security control.

[CVSS 2.1 Low](https://www.first.org/cvss/calculator/4-0#CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N) -- An issue owner can manipulate form inputs to delete the content history of comments they did not create, as long as those comments are on issues that they own.  Although comment content is not affected, the history of edits on the comment can be trimmed.  The validation in the form handler was corrected.

[CVSS 5.1 Medium](https://www.first.org/cvss/calculator/4-0#CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N) -- When a repository is configured with tag protection rules, it should not be possible for a user that is outside the whitelisted users or teams from modifying the protected tags.  An incorrect parameter being passed to a security verification method allowed a user with write access to the repo to delete tags even if they were protected, as long as the tag was originally created by a user who is still authorized by the protection rules.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Security bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/10039): <!--number 10039 --><!--line 0 --><!--description Zml4KGFwaSk6IGZpeCBkZXBlbmRlbmN5IHJlcG8gcGVybXMgaW4gQ3JlYXRlL1JlbW92ZUlzc3VlRGVwZW5kZW5jeQ==-->fix(api): fix dependency repo perms in Create/RemoveIssueDependency<!--description-->
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/10039): <!--number 10039 --><!--line 1 --><!--description Zml4KGFwaSk6IGRyYWZ0IHJlbGVhc2VzIGNvdWxkIGJlIHJlYWQgYmVmb3JlIGJlaW5nIHB1Ymxpc2hlZA==-->fix(api): draft releases could be read before being published<!--description-->
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/10039): <!--number 10039 --><!--line 2 --><!--description bWlzY29uZmlndXJlZCBzZWN1cml0eSBjaGVja3Mgb24gdGFnIGRlbGV0ZSB3ZWIgZm9ybQ==-->misconfigured security checks on tag delete web form<!--description-->
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/10039): <!--number 10039 --><!--line 3 --><!--description aW5jb3JyZWN0IGxvZ2ljIGluICJVcGRhdGUgUFIiIGRpZCBub3QgZW5mb3JjZSBoZWFkIGJyYW5jaCBwcm90ZWN0aW9uIHJ1bGVzIGNvcnJlY3RseQ==-->incorrect logic in "Update PR" did not enforce head branch protection rules correctly<!--description-->
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/10039): <!--number 10039 --><!--line 4 --><!--description aXNzdWUgb3duZXIgY2FuIGRlbGV0ZSBhbm90aGVyIHVzZXIncyBjb21tZW50J3MgZWRpdCBoaXN0b3J5IG9uIHNhbWUgaXNzdWU=-->issue owner can delete another user's comment's edit history on same issue<!--description-->
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/10039): <!--number 10039 --><!--line 5 --><!--description dGFnIHByb3RlY3Rpb24gcnVsZXMgY2FuIGJlIGJ5cGFzc2VkIGR1cmluZyB0YWcgZGVsZXRlIG9wZXJhdGlvbg==-->tag protection rules can be bypassed during tag delete operation<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10039
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-11-21 04:31:31 +01:00
..
actions [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
activitypub [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
analyze Rename code_langauge.go to code_language.go (#26377) 2023-08-07 15:00:53 -04:00
assetfs [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
auth [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
avatar [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
base [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
cache [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
card [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
charset [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
container chore: teach set module about iter.Seq (#6676) 2025-01-24 16:45:46 +00:00
csv [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
emoji Update emoji set to Unicode 15 (#25595) 2023-06-29 16:29:48 +00:00
eventsource [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
forgefed [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
generate [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
git [v11.0/forgejo] chore: TestParseGitURLs must use a valid IPv6 address (#9624) 2025-10-10 20:36:46 +02:00
gitrepo [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
graceful [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
hcaptcha [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
highlight [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
hostmatcher Support allowed hosts for migrations to work with proxy (#32025) 2024-09-14 17:52:54 +02:00
html Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
httpcache [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
httplib [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
indexer [v11.0/forgejo] storage test: reader should not be closed on save (#9031) 2025-08-26 10:20:00 +02:00
issue/template [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
json Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
keying [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
label [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
lfs [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
locale feat(build): linter for missing msgid definitions (#7109) 2025-03-14 15:50:30 +00:00
log [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
markup [v11.0/forgejo] fix(ui): add missing lazy load attribute to images (#8246) (#8283) 2025-06-26 01:02:41 +02:00
mcaptcha [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
metrics [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
migration [v11.0/forgejo] fix(migrations): transfer PR flow information (#7437) 2025-04-03 07:35:20 +00:00
nosql [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
optional [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
options [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
packages [v11.0/forgejo] feat: Replace mholt/archiver/v3 with mholt/archives (#7025) (#10043) 2025-11-10 17:30:23 +01:00
paginator Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
pprof [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
private [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
process Drop SSPI auth support and more Windows files (#7148) 2025-03-08 00:43:41 +00:00
proxy [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
proxyprotocol [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
public [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
queue [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
recaptcha [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
references [v11.0/forgejo] fix: pull request cross references (#7983) 2025-05-28 18:25:40 +02:00
regexplru [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
repository [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
secret Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
session [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
setting [v11.0/forgejo] fix: LFS GC is never running because of a bug in the parsing of the INI file (#9222) 2025-09-09 23:39:20 +02:00
sitemap Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
ssh [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
storage [v11.0/forgejo] storage test: reader should not be closed on save (#9031) 2025-08-26 10:20:00 +02:00
structs [v11.0/forgejo] Revert "fix(api): document is_system_webhook field (#7784)" (#8287) 2025-06-26 01:38:51 +02:00
svg [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
sync [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
system [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
templates [v11.0/forgejo] fix(ui): add missing lazy load attribute to images (#8246) (#8283) 2025-06-26 01:02:41 +02:00
test [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
testlogger [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
timeutil [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
translation [v11.0/forgejo] fix(i18n): prevent incorrect logging on strings missing in JSON locales (#7599) 2025-04-23 13:44:16 +00:00
turnstile [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
typesniffer [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
updatechecker [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
uri Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
user Drop SSPI auth support and more Windows files (#7148) 2025-03-08 00:43:41 +00:00
util [v11.0/forgejo] fix: use credentials helpers for git clones (#9069) 2025-08-30 18:57:49 +02:00
validation [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
web [v11.0/forgejo] 2025-11-21 combined security patches (#10039) 2025-11-21 04:31:31 +01:00
webhook Add support for workflow_dispatch (#3334) 2024-06-28 05:17:11 +00:00
zstd Cache generated binary across jobs 2024-08-26 23:43:09 +02:00