The vulnerability is an improper access control issue in Gitea's organization project management. Multiple functions responsible for handling project operations (like creation, deletion, and modification of projects and their columns) in routers/web/org/projects.go did not properly validate that the project being acted upon belonged to the organization of the user making the request. The functions would fetch project data using just the project ID from the user's request. An attacker with write access to a project in their own organization could exploit this by sending a request with the ID of a project from a different organization, allowing them to perform unauthorized actions.
The patch addresses this by introducing new data access functions, GetProjectByIDAndOwner and GetColumnByIDAndProjectID, which include ownership checks directly within the database query. The vulnerable functions were then updated to use these new, more secure functions, ensuring that all project operations are properly authorized and scoped to the user's organization.