Repository navigation
add mikrotik CVE-2026-86060 '-2' fd-injection console check - #51
Merged
Merged
Conversation
Present username '-2' (rejected, stays pending), request a pre-auth rekey (CVE-2026-67279), then write the canonical-PTY fd-2 block after pty+shell. Only the -2 + injection combination spawns a RouterOS console: channel-open alone (67279) and injection without the pending '-2' both stay silent, so the console prompt is specific to CVE-2026-86060. Proof is a read-only '/system resource print'. Verified against CHR 7.24.1 / 7.23.3 (positive) and a standards-compliant Go sshd (clean negative). Also drop the temporary excrypto replace now that v0.43.2 is tagged with UnauthClientConn.RequestKeyExchange.
hdm
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
vuln-mikrotik-fd2-inject, a check for CVE-2026-86060 (MikroTik RouterOS SSH login-helper fd injection), completing sshamble's coverage of the three SSH-side CVEs from the CERT Polska advisory alongside the existingvuln-mikrotik-pubkey-bypass(67276) andvuln-mikrotik-preauth-rekey(67279).How detection works
The login helper parses a positional argv starting with
-as-<fd>and reads the trusted (name, policy-mask) fields from that descriptor. A username of-2makes it read them from the PTY. The check:-2withnoneauth (rejected as expected; the username stays pending)RequestKeyExchangefrom add mikrotik CVE-2026-67279 pre-auth rekey session check #50) to open the session channel unauthenticatedname \0 policy \0 VEOF VEOF)/system resource printas proofWhy the signal is specific to 86060
Variant testing against CHR 7.24.1 shows the console appears only with the full combination:
-2+ rekey + fd-2 block-2+ rekey, no fd-2 block-2So the console prompt cannot be a false positive from CVE-2026-67279 alone. RouterOS attribution (ROSSSH banner or MikroTik output) is still required before the CVE is reported, mirroring the rekey check.
Verification
version: 7.24.1 (stable)/platform: MikroTikcaptured as proofAlso in this PR
Drops the temporary
replaceto my excrypto fork now that v0.43.2 is tagged includingUnauthClientConn.RequestKeyExchange(#89), sogo.modresolves the tagged upstream release.Detection-only as with the previous PRs: the fd-2 block is the minimal trigger required to observe the vulnerability; the check executes nothing beyond a read-only version print.