OS Command Injection Vulnerability in OpenSSH Before 9.6

6.5MEDIUM

CVE-2023-51385

Key Information:

Vendor

OpenBSD

Status
CVE ID
CVE ID:
CVE-2023-51385
Vendor
CVE Published:
18 December 2023

Timeline

Exploit known 43 days after it was published

  • 🟑

    Public PoC available

  • πŸ‘Ύ

    Exploit known to exist

  • πŸ“°

    First article discovered by Security Boulevard

  • Vulnerability published

  • Vulnerability Reserved

Badges

πŸ‘Ύ Exploit Exists🟑 Public PoC🟣 EPSS 19%πŸ“° News Worthy

How risky is it?

  • Yes: Works over the network, no login needed
  • Yes: Public exploit code (13 proof-of-concepts)
  • No: Not on CISA's exploited list
  • No: No ransomware use seen

Our verdict

Patch this week

Exploitation is likely. Prioritise the fix.

What to do

1Check the vendor's fix

No fixed version is recorded yet. The vendor advisory is the authoritative source for patches.

Read the vendor advisory β†—
2Can't patch yet? Reduce exposure

It can be reached over the network, so limit who can reach Openssh. Block it from the internet, allow only trusted hosts or a VPN, and turn off the affected feature if you don't use it, until you can update.

3Look for signs of compromise

Exploit code is public, so check logs on exposed Openssh systems for unusual requests or new processes from before you patched. The 13 public proof-of-concepts show what an attack looks like.

4Why it's rated "Patch this week"
  • Exploit code is public, so attacks are easy to copy.
  • It can be exploited remotely without credentials.
  • EPSS gives it a 19.7% chance of exploitation in the next 30 days.
  • Its CVSS severity is medium (6.5).

What is CVE-2023-51385?

In ssh in OpenSSH before 9.6, OS command injection might occur if a user name or host name has shell metacharacters, and this name is referenced by an expansion token in certain situations. For example, an untrusted Git repository can have a submodule with shell metacharacters in a user name or host name.

Exploit Proof of Concept (PoC)

PoC code is written by security researchers to demonstrate the vulnerability can be exploited. PoC code is also a key component for weaponization which could lead to ransomware.

News Articles

favicon imageCyber Kendra

Critical OpenSSH Flaw Could Allow Remote Code Execution - Cyber Kendra

Critical OpenSSH Flaw Could Allow Remote Code Execution

OpenSSH Vulnerabilities - An Urgent Call for Continuous Security Updates

Several security vulnerabilities identified in OpenSSH could potentially allow attackers to escalate their privileges and execute command injection. The Terrapin attack further exploits the protocol's weaknesses, emphasizing the need for continuous security monitoring and updates.

favicon imageSecurity Boulevard

OpenSSH Command Injection Vulnerability (CVE-2023-51385) Alert

Overview Recently, NSFOCUS CERT detected that OpenSSH released a security update and fixed a command injection vulnerability caused by malicious shell characters (CVE-2023-51385), with a CVSS score of 9.8; Since there is no security filtering of username and hostname input represented by %h,%u in Op...

References

Password Authentication Bypass in OpenSSH on Linux Systems Using Musl libc

CVE-2026-123158
OpenBSDOpensshπŸ˜„πŸ‘Ύ8.1HIGH

Vulnerability in OpenSSH

CVE-2026-35414
OpenBSDOpensshπŸ‘Ύ4.2MEDIUM

Vulnerability in OpenSSH

CVE-2025-61984
OpenBSDOpensshπŸ˜„πŸ‘Ύ3.6LOW
View more OpenBSD vulnerabilities...

Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities Β· Report a correction

EPSS Score

19% chance of being exploited in the next 30 days.

CVSS V3.1

Score:
6.5
Severity:
MEDIUM
Confidentiality:
Low
Integrity:
Low
Availability:
Low
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged
.