GitLab has remediated an issue in GitLab CE/EE affecting all versions from 13.12 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 authenticated user to read private CI/CD template files from projects they did not have access to due to missing authorization checks.
https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-5-6-released/
https://hackerone.com/reports/4004470