GHSA-JH4G-98FM-JCQC
Api\AssetsController::store writes plaintext into encrypted-flagged custom-field columns when caller lacks assets.view.encrypted_custom_fields
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-JH4G-98FM-JCQC divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
`Api\AssetsController::store` had the encryption gate structured as:
if ($field->field_encrypted == '1') {
if (Gate::allows('assets.view.encrypted_custom_fields')) {
$field_val = Crypt::encrypt($field_val);
}
// No `else continue;` here.
}
$asset->{$field->db_column} = $field_val;When the caller did not hold `assets.view.encrypted_custom_fields`, `Gate::allows()` returned false, the inner `Crypt::encrypt()` did not run, and `$field_val` fell through to the unconditional write as raw plaintext.
The sibling `Api\AssetsController::update` had the same block structured correctly with `continue;` under the deny branch. Non-API paths and `BulkAssetsController` also handled it correctly. `Api\AssetsController::store` was the outlier.
Impact
Data-integrity and encryption-at-rest violation:
- Raw plaintext written into a column that the schema and UI presented as encrypted.
- Privileged readers saw `Error Decrypting: The payload is invalid.` from `Crypt::decrypt()` against the plaintext payload.
- DB backups, DBA access, and replicas held plaintext for a column documented as encrypted.
Not a confidentiality bypass for the writer: the transformer redacts the value back to the literal string `"ENCRYPTED"` for any reader without `assets.view.encrypted_custom_fields`.
Affected
- `app/Http/Controllers/Api/AssetsController.php::store` (lines around the `field_encrypted` gate)
Affected versions: `<= 8.6.3`.
Fix
Fixed in commit `34dafe9eed`. The `store()` block now mirrors the `update()` pattern: when the encryption gate denies, the field is skipped via `continue;` rather than written as plaintext.
Patched in `8.7.0` and later.
References
- CWE-311 (Missing Encryption of Sensitive Data)
- CWE-670 (Always-Incorrect Control Flow Implementation)
Estado del parche por paquete
La fuente no informa paquetes ni versiones corregidas.
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/grokability/snipe-it/security/advisories/GHSA-jh4g-98fm-jcqcLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
