GHSA-3R7Q-F6GV-VV3Q
Unbounded source map cache in SourceMapResourceHandler
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 3.14.23 | org.omnifaces:omnifaces · -25 d desde divulgación | |
| Remediación | Parche 4.7.12 | org.omnifaces:omnifaces · -25 d desde divulgación | |
| Remediación | Parche 5.4.2 | org.omnifaces:omnifaces · -25 d desde divulgación | |
| Divulgación | Publicada | GHSA-3R7Q-F6GV-VV3Q divulgada · CVSS 5.3 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
`SourceMapResourceHandler` cached every distinct resource identifier it decorated, including identifiers which have no source map at all. Where another handler synthesizes resources for attacker chosen names, this grew a process lifetime static cache which has no size limit and no eviction.
Details
The handler consults a static map keyed by resource identifier to decide whether a source map exists for a given resource:
String sourceMap = SOURCE_MAPS.computeIfAbsent(new ResourceIdentifier(libraryName, resourceName), this::computeSourceMap);`computeSourceMap` returns an empty string when the resource has no source map, and `computeIfAbsent` stores that result, so a negative lookup left a permanent entry under that key. Nothing evicts it.
`decorateResource` returns early when the wrapped handler resolved nothing, so arbitrary names alone do not reach the cache. They reach it when a resource handler synthesizes a resource for any name it is asked for, which `CombinedResourceHandler.createResourceFromLibrary` does by design: it returns a new `CombinedResource` for every name under the `omnifaces.combined` library, whether or not the ID resolves to anything servable. Each distinct name in that library therefore left one permanent entry. In a reported test, 40 unique missing combined resource requests grew the cache from 13 to 92 entries.
Growth is slow and each entry is small, so this degrades a long running deployment rather than exhausting it quickly.
Both handlers are optional. `SourceMapResourceHandler` must be explicitly registered in `faces-config.xml`, and reaching the cache with arbitrary names additionally requires a synthesizing handler such as `CombinedResourceHandler` above it. Deployments without the source map handler are unaffected.
Patches
The handler now caches only resources which actually have a source map.
Upgrade to 3.14.23, 4.7.12 or 5.4.2.
Workarounds
Remove `SourceMapResourceHandler` from `faces-config.xml`.
Related advisories
Four further weaknesses affecting the same releases are tracked separately, each with its own affected range and fix:
- GHSA-fp43-vj7g-pg92 — forged combined resource IDs accepted without authenticity check
- GHSA-7qfp-gggj-2fv4 — script injection through the URL fragment value of `o:hashParam`
- GHSA-4w3g-h8rh-9hwj — session and view scoped WebSocket push channels not bound to their owning HTTP session
- GHSA-w3w6-9m25-g88p — the same weakness on the SSE transport, fixed in 5.4.3
Credits
Reported by Daniel Birtwhistle.
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 | 3.14.23, 4.7.12, 5.4.2 | -25 d · -25 d · -25 d | 5.5.7 no afectada |
3.14.234.7.125.4.2Arsenal 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-3r7q-f6gv-vv3qLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
