Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-hprf-rrwq-jm5c: Plaintext Storage of Keys and Passwords in Rundeck and PagerDuty Process Automation

Impact

The Key Storage converter plugin mechanism was not enabled correctly in Rundeck 4.2.0 and 4.2.1, resulting in use of the encryption layer for Key Storage possibly not working. Any credentials created or overwritten using Rundeck 4.2.0 or 4.2.1 might result in them being written in plaintext to the backend storage.

If you are using a "Storage Converter" plugin, such as jasypt-encryption configured via the rundeck.storage.converter.1.type=jasypt-encryption setting, and you installed 4.2.0 or 4.2.1 then please upgrade to one of the patched versions.

If you do not use a "Storage Converter" plugin, this would not affect you.

Patches

Rundeck 4.3.1 and 4.2.2 have fixed the code and upon upgrade will re-encrypt any plain text values.

Note: 4.3.0 does not have the vulnerability, but does not include the patch to re-encrypt plain text values if 4.2.0 or 4.2.1 were used.

Workarounds

To prevent plaintext credentials from being stored in Rundeck 4.2.0/4.2.1, write access to key storage can be disabled via ACLs. After upgrading to 4.3.1 or later, write access can be restored.

This aclpolicy document can be used to deny all write access to storage:

---
by:
  group: '.*'
context:
  application: rundeck
for:
  storage:
  - deny:
    - create
    - update
description: deny create or update for storage in application context
---
by:
  group: '.*'
context:
  project: .*
for:
  storage:
  - deny:
    - create
    - update
description: deny create or update for storage in project context

To remove plaintext credentials, the metadata of stored keys can be used to detect if the key was stored with encryption enabled or not. In the case of the “jasypt-encryption” plugin, encrypted values will have a metadata field of “jasypt-encryption:encrypted”:”true” in the JSON metadata. If you are using the relational database as your key storage backend (rundeck.storage.provider.1.type=db), you can query for keys that are unencrypted. Here is an example query for Mysql:

select id,dir,name from storage where json_data not like "%jasypt-encryption:encrypted\":\"true%" and namespace is null and dir like "keys%"

References

Configuration Settings for Storage Converters: https://docs.rundeck.com/docs/administration/configuration/plugins/configuring.html#storage-converter-plugins

About Storage Converters: https://docs.rundeck.com/docs/manual/key-storage/key-storage.html#key-data-storage-converter

For more information

If you have any questions or comments about this advisory:

ghsa
#sql#vulnerability#js

Impact

The Key Storage converter plugin mechanism was not enabled correctly in Rundeck 4.2.0 and 4.2.1, resulting in use of the encryption layer for Key Storage possibly not working. Any credentials created or overwritten using Rundeck 4.2.0 or 4.2.1 might result in them being written in plaintext to the backend storage.

If you are using a “Storage Converter” plugin, such as jasypt-encryption configured via the rundeck.storage.converter.1.type=jasypt-encryption setting, and you installed 4.2.0 or 4.2.1 then please upgrade to one of the patched versions.

If you do not use a “Storage Converter” plugin, this would not affect you.

Patches

Rundeck 4.3.1 and 4.2.2 have fixed the code and upon upgrade will re-encrypt any plain text values.

Note: 4.3.0 does not have the vulnerability, but does not include the patch to re-encrypt plain text values if 4.2.0 or 4.2.1 were used.

Workarounds

To prevent plaintext credentials from being stored in Rundeck 4.2.0/4.2.1, write access to key storage can be disabled via ACLs. After upgrading to 4.3.1 or later, write access can be restored.

This aclpolicy document can be used to deny all write access to storage:

---
by:
  group: '.*'
context:
  application: rundeck
for:
  storage:
  - deny:
    - create
    - update
description: deny create or update for storage in application context
---
by:
  group: '.*'
context:
  project: .*
for:
  storage:
  - deny:
    - create
    - update
description: deny create or update for storage in project context

To remove plaintext credentials, the metadata of stored keys can be used to detect if the key was stored with encryption enabled or not. In the case of the “jasypt-encryption” plugin, encrypted values will have a metadata field of “jasypt-encryption:encrypted”:”true” in the JSON metadata. If you are using the relational database as your key storage backend (rundeck.storage.provider.1.type=db), you can query for keys that are unencrypted. Here is an example query for Mysql:

select id,dir,name from storage where json_data not like "%jasypt-encryption:encrypted\":\"true%" and namespace is null and dir like "keys%"

References

Configuration Settings for Storage Converters: https://docs.rundeck.com/docs/administration/configuration/plugins/configuring.html#storage-converter-plugins

About Storage Converters:
https://docs.rundeck.com/docs/manual/key-storage/key-storage.html#key-data-storage-converter

For more information

If you have any questions or comments about this advisory:

  • Open an issue in our forums
  • Enterprise Customers can open a Support ticket

References

  • GHSA-hprf-rrwq-jm5c
  • https://nvd.nist.gov/vuln/detail/CVE-2022-31044

Related news

CVE-2022-31044

Rundeck is an open source automation service with a web console, command line tools and a WebAPI. The Key Storage converter plugin mechanism was not enabled correctly in Rundeck 4.2.0 and 4.2.1, resulting in use of the encryption layer for Key Storage possibly not working. Any credentials created or overwritten using Rundeck 4.2.0 or 4.2.1 might result in them being written in plaintext to the backend storage. This affects those using any `Storage Converter` plugin. Rundeck 4.3.1 and 4.2.2 have fixed the code and upon upgrade will re-encrypt any plain text values. Version 4.3.0 does not have the vulnerability, but does not include the patch to re-encrypt plain text values if 4.2.0 or 4.2.1 were used. To prevent plaintext credentials from being stored in Rundeck 4.2.0/4.2.1, write access to key storage can be disabled via ACLs. After upgrading to 4.3.1 or later, write access can be restored.