CVE-2026-110480
Camel-SSH Host Key Verification Bypass via Substring Matching of known_hosts Entries
Description
In Apache Camel's camel-ssh component, the ResourceBasedSSHKeyVerifier used when a knownHostsResource is configured selected the server's trusted key by matching the connecting host against known_hosts entries with substring comparison and first-match-wins, instead of OpenSSH host-pattern semantics applied to the configured connection host. As a result the public key listed for a different but textually overlapping entry could be accepted when validating the server the client connects to, so host-key verification could confirm the wrong server's identity even with strict checking (failOnUnknownHost=true) enabled. This is fixed in 4.18.6, 4.22.3 and 4.24.0, which match the configured host with OpenSSH-compatible patterns (globbing, negation, hashed and revoked entries, all lines considered) and fail closed on an unreadable resource or entry.
Mitigation
Credit
This issue was discovered by Shashank Mohan Jain
Notes
The JIRA ticket: https://issues.apache.org/jira/browse/CAMEL-25644 refers to the various commits that resolved the issue, and have more details.