GHSA-2689-9HM6-WM9Q
Forged combined resource IDs grow the combined resource content cache
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-2689-9HM6-WM9Q divulgada · CVSS 7.5 (GitHub) | |
| Remediación | Parche 1.14.4 | org.omnifaces:omnifaces · 0 d desde divulgación | |
| Remediación | Parche 2.7.34 | org.omnifaces:omnifaces · 0 d desde divulgación | |
| Remediación | Parche 3.14.25 | org.omnifaces:omnifaces · 0 d desde divulgación | |
| Remediación | Parche 4.7.14 | org.omnifaces:omnifaces · 0 d desde divulgación | |
| Remediación | Parche 5.5.4 | org.omnifaces:omnifaces · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
`CombinedResourceHandler` serves a combined resource for any structurally valid ID presented in the URL. When server side caching of the combined resource content is activated, the response bytes are stored in an application scoped cache keyed by that raw ID. Distinct IDs which all decode to the same resource are stored as distinct entries, so an unauthenticated caller can grow the cache until the heap is exhausted.
Details
A combined resource ID is a deflated and base64 encoded list of resource identifiers. It travels in the URL and is decoded at serve time. `CombinedResource#getInputStreamFromCache` writes the assembled bytes under that ID:
combinedResourceCache.putObject(resourceId, cachedCombinedResource, cacheTTL);`resourceId` is the raw string taken from the request. It is never canonicalized to the set of resources it decodes to, and nothing distinguishes a server issued ID from a minted one, so the number of distinct keys bears no relation to the number of resource combinations the deployment can actually render. `CombinedResourceInfo#fromUniqueId` collects the decoded identifiers in a `LinkedHashSet`, so `a.js|a.js|a.js` and `a.js` name the same single resource while remaining distinct keys. A single repeated resource yields roughly 6500 keys before the 64 KiB inflate limit stops it; two or more real resources in varying combinations lift that ceiling out of reach.
The entry is never reclaimed. The default cache expires lazily, on the next read of the same key, and an attacker key is read once, so its time to live elapses without anything removing it. The default cache store is a plain `ConcurrentHashMap` unless `APPLICATION_MAX_CAPACITY` is configured, so there is no capacity ceiling either.
Each entry holds the full combined content, and the caller chooses which resources to combine, so the cost per request is theirs to maximize. In a test on WildFly with Mojarra, 20 forged IDs which all decode to `jakarta.faces:faces.js` were each served with HTTP 200 and an identical 22661 byte body, and left exactly 20 entries in the application cache.
This requires the content cache to be activated. `org.omnifaces.COMBINED_RESOURCE_HANDLER_CACHE_TTL` defaults to 0, which disables it, and it is ignored when the Faces project stage is `Development`. Deployments which do not set it are unaffected. Deployments which set it and also configure a bounded cache provider, or `APPLICATION_MAX_CAPACITY` on the default provider, are bounded by that capacity.
Patches
The content cache is now populated only for server issued IDs, mirroring the resource info cache. A forged but structurally valid ID is still served, it is no longer cached.
Upgrade to 1.14.4, 2.7.34, 3.14.25, 4.7.14 or 5.5.4.
Workarounds
Leave `org.omnifaces.COMBINED_RESOURCE_HANDLER_CACHE_TTL` unset or 0, which disables the content cache, or bound the application scoped cache by setting the `org.omnifaces.CACHE_SETTING_APPLICATION_MAX_CAPACITY` context parameter as per `Cache` javadoc.
Related advisories
- GHSA-fp43-vj7g-pg92 — forged combined resource IDs accepted without authenticity check. Its fix bounded the resource info cache, which is a different cache on a different code path.
- GHSA-3r7q-f6gv-vv3q — unbounded source map cache in `SourceMapResourceHandler`, a different handler and a different cache.
Credits
Reported by zx (@manus-pi).
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
mavenorg.omnifaces:omnifaces |
Corregida | 1.14.4, 2.7.34, 3.14.25, 4.7.14, 5.5.4 | 0 d · 0 d · 0 d · 0 d · 0 d | 5.5.7 no afectada |
1.14.42.7.343.14.254.7.145.5.4Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/omnifaces/omnifaces/security/advisories/GHSA-2689-9hm6-wm9qLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
