Skip to content
Access control Advisory Advanced CVE-2023-2283

GHSL-2023-085: Authentication bypass in libssh - CVE-2023-2283

A logic bug in libssh's public key signature verification could cause the function to return success even when the signature check was skipped due to an error. An attacker could potentially bypass authentication and gain unauthorised access to another user's account via SSH login.

kevinbackhouse Follow

Originally disclosed on GitHub Security Lab

The public key signature checking code in pkiverifydatasignature has a logic bug, which, under certain conditions, could enable an attacker to bypass the check.

kevinbackhouse, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the function initialises a return code to an error value but then overwrites it with a success value before the cryptographic verification, so if a later step fails and jumps to cleanup, the function returns success.

Impact

This issue may enable a remote attacker to gain unauthorized access to another user’s account via ssh login, but exploitability depends on the integration and whether an error condition can be triggered.

What the attacker needed

Libssh integrated into an application; ability to trigger an error condition; often requires memory exhaustion

The fix

The fix was implemented and released in libssh 0.10.5 and 0.9.7.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you log in with a key, the server checks a mathematical signature to prove you own the key. A bug in that check could make the server think the signature is valid even when it was never actually checked, letting an attacker log in as someone else.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by kevinbackhouse

View all

47 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.