The vulnerability lies in the services/convert/notification.go file, specifically within the ToNotificationThread function. The original code did not re-verify a user's access rights to a repository when fetching notification details. It assumed that if a notification existed for a user, they still had valid permissions. The patch, identified in commit 67e75f30a83d2523cedc37ad7b03bcba66947833, rectifies this by adding an explicit permission check. It now calls access_model.GetUserRepoPermission to fetch the user's current permissions for the repository associated with the notification. Only if the user has any level of access (perm.HasAnyUnitAccessOrPublicAccess()) is the repository information, which contains potentially sensitive titles of issues and pull requests, included in the API response. This prevents users who have had their access revoked from continuing to see updates from private repositories.