A flaw was found in Red Hat Developer Hub (RHDH) in the catalog-import function. The vulnerability is that the catalog-import function leaks GitLab access tokens on the frontend. This leakage occurs when the base64 encoded GitLab token includes a newline at the end of the string. The sanitized error displayed on the frontend inadvertently includes the raw access token, which should never be exposed to frontend users. The impact of this vulnerability is significant. An attacker, upon gaining access to this token, could potentially execute a range of malicious activities depending on the token's permissions. These activities could include pushing malicious code to repositories, deleting resources in Git, revoking or generating new keys, or even signing code illegitimately.
Red Hat Product Security would like to thank Josephine Pfeiffer for reporting this issue.
Upstream issues & PR: https://github.com/janus-idp/backstage-showcase/issues/816 https://github.com/backstage/backstage/issues/21503 https://github.com/backstage/backstage/pull/21582
*** Bug 2260001 has been marked as a duplicate of this bug. ***