title: Rhdh: catalog-import function leaks credentials to frontend
description: A flaw was found in the Red Hat Developer Hub (RHDH). The catalog-import function leaks GitLab access tokens on the frontend when the base64 encoded GitLab token includes a newline at the end of the string. The sanitized error can display on the frontend, including the raw access token. Upon gaining access to this token and depending on permissions, an attacker could push malicious code to repositories, delete resources in Git, revoke or generate new keys, and sign code illegitimately.
problem types: Generation of Error Message Containing Sensitive Information
affected:
{
product: rhdh
vendor: n/a
versions:
version: 1.21.0, status: unaffected
}
{
vendor: Red Hat
product: Red Hat Developer Hub
collectionURL: https://catalog.redhat.com/software/containers/
packageName: rhdh-hub-container
defaultStatus: affected
cpes: cpe:/a:redhat:rhdh:1
}
metrics:
other: [
content: {'value': 'Moderate', 'namespace': 'https://access.redhat.com/security/updates/classification/'}
type: Red Hat severity rating
]
workarounds: To mitigate this vulnerability until you can update to RHDH 1.1, ensure that the base64 encoded GitLab token does not contain a newline character at the end. Removing the newline from the token prevents the unintended disclosure of the access token through the frontend.