add mikrotik CVE-2026-67279 pre-auth rekey session check - #50
Conversation
RouterOS loses track of the incomplete userauth state when the client requests a key re-exchange before authenticating, and then accepts connection-protocol messages anyway (fixed in 7.24.2 / 7.23.4 / 6.49.21). An unauthenticated client can open a session channel without any credentials. The new vuln-mikrotik-preauth-rekey check requests a rekey immediately after the initial key exchange, skips the userauth service entirely, and tries to open a session channel. It needs no credentials and no victim key material (unlike the CVE-2026-67276 check, which needs the victim's public key). Two guards keep it precise: - negative control: the same pre-auth channel open without the rekey must be refused, otherwise the server accepts pre-auth sessions generally (a different defect) - RouterOS attribution: the server banner (ROSSSH) or the proof command output must identify RouterOS before naming the CVE Requires the client-requested rekey API from runZeroInc/excrypto#89; go.mod temporarily replaces excrypto with the fork branch and should be bumped to a tagged excrypto release once that lands. Live-tested against a vulnerable CHR 7.24.1 VM (detected) and against a compliant Go sshd (control refuses the channel, not reported).
|
|
To clarify what this check sits in front of (the two MikroTrick paths are independent): Path A (this check's CVE + the privesc): CVE-2026-67279 alone is almost a dud — the pre-auth session channel opens, but the login helper runs with no valid identity (bare sessions get Path B (the RSA e=1 thing, CVE-2026-67276): a parallel, independent auth bypass — needs knowledge of a victim's authorized public key (modulus), gets you that account's privileges directly. Already covered by Why detecting 67279 alone is the right scope: both halves of Path A were fixed in the same releases (7.24.2 / 7.23.4 / 6.49.21), so "67279 present" ⟺ "full unauth chain present". This check intentionally stops at proving the pre-auth channel opens (with the no-rekey control refused) — the 86060 escalation isn't needed for detection and stays out of scanner code. |
Summary
Adds
vuln-mikrotik-preauth-rekey: a fully unauthenticated check for CVE-2026-67279 (MikroTrick rekey bug), complementing the existing CVE-2026-67276 pubkey check from #main.RouterOS loses track of the incomplete userauth state when the client requests a key re-exchange before authenticating, and then accepts connection-protocol messages anyway. An unauthenticated client can open a session channel without any credentials. Fixed in RouterOS 7.24.2 / 7.23.4 / 6.49.21.
This closes a detection gap: the existing
vuln-mikrotik-pubkey-bypasscheck needs the victim's authorized public key (--mikrotik-pubkey), while this check needs nothing but network access to the SSH service.How it works
/system resource printas a read-only proof/fingerprintTwo guards keep the report precise:
vuln-exec-skip-userauth) and we do not report CVE-2026-67279SSH-2.0-ROSSSH) or the proof output must identify RouterOS before the CVE is namedDependency
Requires
(*ssh.UnauthClientConn).RequestKeyExchange()from runZeroInc/excrypto#89.go.modtemporarily replaces excrypto with the fork branch so this builds; it should be bumped to a tagged excrypto release once that PR lands.Testing
CVE-2026-67279: session channel opened without authentication after a client-requested pre-auth rekey (server: SSH-2.0-ROSSSH; control without rekey was refused)ssh: no auth passed yet), nothing reportedgo test ./...passesRefs: