Sensitive Password Leak in Async Job Status Update Logging (`updateAsyncJobStatus`)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
Línea de trabajo
Comience en framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java, en updateAsyncJobStatus, y compare después su logging con completeAsyncJob y la ruta existente de ofuscación de contraseñas. Ejecute AsyncJobManagerImplTest y verifique que los resultados de progreso que contienen una contraseña no se emitan en texto plano, mientras que el logging normal del estado siga funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Advisory Details
Title: Sensitive Password Leak in Async Job Status Update Logging (updateAsyncJobStatus)
Description:
In Apache CloudStack, any asynchronous task triggered by a user (e.g. creating virtual machines, volumes, or managing templates) is executed under the asynchronous job framework (cloud-framework-jobs). During execution, progress or status updates are processed and logged by the management server via AsyncJobManagerImpl.updateAsyncJobStatus.
While the developers previously patched a sensitive password leak in the job completion logger (completeAsyncJob), they completely missed updateAsyncJobStatus. Specifically, in AsyncJobManagerImpl.java, progress/status updates were directly logged in plain text when DEBUG logging was enabled:
@Override
@DB
public void updateAsyncJobStatus(final long jobId, final int processStatus, final String resultObject) {
if (logger.isDebugEnabled()) {
logger.debug("Update async-job progress, job-" + jobId + ", processStatus: " + processStatus + ", result: " + resultObject);
}
If an asynchronous operation reports progress containing a serialized command response, database configuration, or credentials (such as standard fields containing "password"), these raw, unmasked secrets will leak directly into the management server log files.
Summary
An information exposure vulnerability exists in Apache CloudStack's asynchronous job execution framework (cloud-framework-jobs). When DEBUG level logging is enabled on the management server, intermediate status/progress updates containing raw, unmasked sensitive credentials (such as standard "password" fields) are printed in plain text directly to the system log via AsyncJobManagerImpl.updateAsyncJobStatus. This bypasses existing password obfuscation mechanisms implemented in other parts of the job framework.
Details
During asynchronous job execution, progress updates are logged via AsyncJobManagerImpl.updateAsyncJobStatus. Unlike AsyncJobManagerImpl.completeAsyncJob, which properly obfuscates user passwords using convertHumanReadableJson(obfuscatePassword(resultObject, HidePassword.value())), updateAsyncJobStatus directly outputs resultObject to the logger without any filtering or sanitization. Consequently, any JSON payload containing sensitive fields such as "password" or database configurations with credentials is written in plain text to log files, exposing them to any user or internal service with log access.
PoC
Prerequisites
- A standard Java and Maven build environment.
- The
org.apache.cloudstack:cloud-framework-jobsmodule compiled. - Logging level for
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImplconfigured toDEBUG.
Reproduction Steps
- Download the Docker Environment Configuration file: docker-compose.yml
- Download the Replication Test Automation script: verification_test_Issue-cloudstack-8854.py
- Download the Control Group Test script: control-obfuscation_check.py
- Execute the replication script from the root of the workspace to build the module, run the regression test, and witness the plain text leak:
python3 verification_test_Issue-cloudstack-8854.py - Execute the control group script to verify that the password obfuscation logic functions correctly under normal conditions:
python3 control-obfuscation_check.py
Log of Evidence
23:13:05.397 [main] DEBUG org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl - Update async-job progress, job-1, processStatus: 1, result: {"password":"mysecretpassword","other":"field"}
23:13:05.402 [main] DEBUG org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl - job-1 no longer exists, we just log progress info here. progress status: 1
Captured Writer Log Output:
Update async-job progress, job-1, processStatus: 1, result: {"password":"mysecretpassword","other":"field"}job-1 no longer exists, we just log progress info here. progress status: 1
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.185 s <<< FAILURE! - in org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImplTest
[ERROR] testUpdateAsyncJobStatusObfuscation(org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImplTest) Time elapsed: 0.754 s <<< FAILURE!
java.lang.AssertionError: Vulnerability Triggered: plaintext password leaked!
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImplTest.testUpdateAsyncJobStatusObfuscation(AsyncJobManagerImplTest.java:118)
Impact
- Vulnerability Type: Information Exposure / Log Injection of Sensitive Credentials
- Asset Compromise: High. Exposing administrator and virtual machine passwords or other private API keys inside standard log files allows local attackers, internal users, or compromised log ingestion pipelines (ELK, Splunk) to gain complete access to hypervisors, OOB/IPMI consoles, and private cloud infrastructure.
Affected products
- Ecosystem: maven
- Package name: org.apache.cloudstack:cloud-framework-jobs
- Affected versions: <= 4.22.1.0 (commit:
348ce953a99246a756b527994f7745a7be038234) - Patched versions:
Severity
- Severity: High
- Vector string: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weaknesses
- CWE: CWE-532: Insertion of Sensitive Information into Log File
Occurrences
| Permalink | Description |
|---|---|
| https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java#L438-L442 | The vulnerable logging statement inside updateAsyncJobStatus method that prints raw progress results containing plain text passwords without any obfuscation filter. |
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.4k
- Merge medio
- 7 d 5 h
- PR fusionados (30 d)
- 28
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/cloudstack
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os's Abiertobug component:kubernetes
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
apache/cloudstack#14070 · 5 comentarios ·
-
component:backup
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 Abiertobug component:ceph
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/cloudstack#13989 · 3 comentarios ·
-
component:UI
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/cloudstack#13944 · 3 comentarios ·
Todos los issues de apache/cloudstack
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
infinispan/infinispan#18150 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
opensearch-project/k-NN#3597 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100