GitLab has remediated an issue in GitLab CE/EE affecting all versions from 17.11 before 19.3.9, 19.4 before 19.4.8, and 19.5 before 19.5.6 that under certain conditions could have allowed an unauthenticated user to read commit comments from a private source fork through a public project's merge request discussions due to missing authorization checks.
https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-5-6-released/