Skip to content

Invalid variable name causes secret exposure in logs

Moderate
ismarc published GHSA-3gqg-6hwf-vq8x Nov 6, 2020

Package

cloudfoundry_conjur_buildpack-{version}.zip (VMWare Tanzu Application Service)

Affected versions

<= 2.1.4

Patched versions

2.1.5

Description

Impact

When an invalid environment variable name is specified in the secrets.yml file, CyberArk Conjur Buildpack logs an error message that contains the value intended for that environment variable. This error is generated after retrieving secrets from CyberArk Conjur or CyberArk Dynamic Access Provider (DAP). This results in the secret value being exposed in the logs. If these log messages are then aggregated elsewhere, these same secret values can be exposed to people who might not otherwise have access to them.

An invalid environment variable name is one that has any characters other than uppercase letters, lowercase letters, digits and underscores.

If, at any time, an error like this occurred, then users should assume any associated secret values are in the associated logs.

This vulnerability does not by itself enable attacks by external attackers as installing the Buildpack requires privileged access to Conjur/DAP. Anyone who can install the Buildpack can already query Conjur/DAP to get the secret values.

Example

If the secrets.yml had this (an invalid environment variable name using '.' characters):

AWS.SECRET.KEY: !var aws/prod/user/robot/secret_access_key

the log message would look like this:

bash: export: `AWS.SECRET.KEY=<some-sensitive-secret-value>': not a valid identifier

where <some-sensitive-secret-value> is the value in Conjur/DAP stored at aws/prod/user/robot/secret_access_key

Updated Version

This vulnerability is fixed in Buildpack v2.1.5 and later. CyberArk recommends upgrading to this version to avoid potential future exposures.

Workarounds

Ensure your variable names are valid prior to installing the Buildpack.

If you have already exposed one or more secrets, you should rotate those secret values as soon as possible.

References

For more information

If you have any questions or comments about this advisory:

Severity

Moderate

CVE ID

No known CVE

Weaknesses

No CWEs

Credits