
CVE-2026-102508 and CVE-2026-102509 in Apache PLC4X allow a rogue OPC UA server to silently strip integrity protections, harvest credentials, and falsify PLC values with no client-side error. Fixed only in 1.0.0; most downstream consumers still pin vulnerable releases. Key details: - CVE-2026-102508 (PLC4X 0.9.0 - 0.13.1) chains three defects in the OPC UA secure channel. In AsymmetricEncryptionHandler.verify(), a missing negation inverts the signature check so any bytes, including zeros or random data, pass as valid. In BaseEncryptionHandler.decodeMessage(), the post-decryption (shorter) buffer is verified against the original on-wire length, feeding verify() a misaligned slice that never matches, and bug 1 silently accepts that failure. The default trust configuration compounds this: with no trust-store-file, OpcuaDriverContext accepted any certificate from the unauthenticated GetEndpoints response, encrypting the client nonce and user password to an attacker-supplied key. A downgrade defect (0.12.0+) also admits a weaker security policy when only one of policy or mode mismatches, and from 0.13.0 sorts admitted candidates ascending by securityLevel, preferring the weakest. The researcher demonstrated this in full: a relay answered GetEndpoints with its own certificate, decrypted the client OPN, derived the symmetric session keys, and altered a write from 100.0 to 999.0 confirmed on the real server, with zero error at the client. - CVE-2026-102509 (0.10.0 - 0.13.1) covers three pre-authentication denial-of-service paths. PascalByteString.staticParse() allocates a byte array from a signed int32 wire length before checking availability; setting senderCertificate.stringLength to FF FF FF 7F in an 88-byte OPN response triggers OutOfMemoryError on the Netty thread repeatedly as the client retries. FieldReaderArray.readFieldCount() bounds against Integer.MAX_VALUE only, then pre-allocates an ArrayList backing array before reading any element; a Variant with count 0x7FFFFFFF attempts a multi-gigabyte allocation, reachable in CreateSessionResponse before ActivateSession. Third, Conversation never enforces negotiated maxChunkCount or maxMessageSize on receive; streaming 2,000 MSG chunks of 61,440 bytes (~120 MB) with the continue flag and no final chunk exhausts the JVM, exiting only if -XX:+ExitOnOutOfMemoryError is set. The byte-array allocator is in the shared plc4j-spi and affects ADS and OPC UA drivers specifically. - Downstream exposure is broad. Apache Camel camel-plc4x bundles PLC4X 0.13.1 in its current release (4.23.0) and all active LTS lines; Camel main merged the 1.0.0 update (CAMEL-25617, 2026-10-27) but has not shipped a release yet. Apache StreamPipes 0.98.0 carries 0.13.1 with OPC UA excluded but ADS present, exposing SPI defects. Apache HertzBeat 1.8.0 and 1.9.0 carry 0.12.0 with Modbus and S7 drivers, bounded by their narrower field widths. Roughly a dozen smaller OT gateways and PLC bridges pin 0.9.0 - 0.13.1. Against a Camel route, a rogue server can harvest OPC UA credentials and push falsified values to a historian, database, or message topic with no error surface. - Commits a2dbb6bfc0 and 5a4d5bdb4c (2026-07-10) restore the signature negation, pass the post-decrypt length to verify(), fail the certificate verifier closed by default, enforce chunk count and message size limits, and cap array initial capacity at 1024. Commit 372501287d (2026-06-12) rewrites the SPI read buffer to check availability before allocating. All three ship only in PLC4X 1.0.0, which also defaults to Basic256Sha256 with SignAndEncrypt and rejects weaker negotiated policies. Adding a trust-store-file on pre-1.0.0 deployments blocks certificate impersonation but does not fix the OPN signature check or the byte-string allocation trigger. Responder action: inventory every application pulling plc4j-driver-opcua or plc4j-driver-all, including transitive Camel, StreamPipes, and HertzBeat dependencies. Until upgrade to 1.0.0, configure a trust-store-file to limit certificate impersonation. For threat-hunting, look for OPC UA sessions that completed without a client-side error but where the connecting server certificate differs from the expected endpoint certificate, and correlate historian or database writes for values inconsistent with physical process state. The full write-up and timeline are at the researcher's post linked in the OSS-Security thread. #DFIR_Radar
Post summary
The tweet provides a detailed PoC demonstration of two Apache PLC4X CVEs, including technical specifics and recommended patch/mitigation steps.


