CVE-2021-36370
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP...
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
7.5
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
- Record
CVE-2021-36370- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:P/A:N - Weakness
- CWE-287
- Updated
- 2026-11-02
CVE List No score
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
- Record
CVE-2021-36370- Updated
- 2026-11-02
EUVDEUVD-2021-22990 No score
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
- Record
EUVD-2021-22990- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-j8px-qjm3-fx72 No score
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP...
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
- Record
GHSA-j8px-qjm3-fx72- Weakness
- CWE-287
- Updated
- 2026-11-02
OSVAZL-6678
7.5
CVE-2021-36370 affecting package mc for versions less than 4.8.27-1
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
- Record
AZL-6678- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSV
7.5
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
- Record
CVE-2021-36370- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
Show 7 moreShow less
OSVDEBIAN-CVE-2021-36370
7.5
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
- Record
DEBIAN-CVE-2021-36370- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVOESA-2022-1771
7.5
mc security update
GNU Midnight Commander is a visual file manager, licensed under GNU General Public License and therefore qualifies as Free Software. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included.
Security Fix(es):
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.(CVE-2021-36370)
- Record
OESA-2022-1771- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-36370
7.5
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity.
- Record
UBUNTU-CVE-2021-36370- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVMGASA-2022-0086 No score
Updated mc packages fix security vulnerability
An issue was discovered in Midnight Commander through 4.8.26. When establishing an SFTP connection, the fingerprint of the server is neither checked nor displayed. As a result, a user connects to the server without the ability to verify its authenticity. (CVE-2021-36370)
- Record
MGASA-2022-0086- Updated
- 2026-11-02
OSVopenSUSE-SU-2022:0061-1 No score
Security update for mc
This update for mc fixes the following issues:
Midnight Commander 4.8.27:
-
Core
- Reimplement version detection (#3603, #4249)
- Significantly reduce rebuilt time after version change (#2252, #4266)
- Drop automatic migration of configuration from ~/.mc to XDG-based directories (#3682)
- zsh: support custom configuration file: ~/.local/share/mc/.zshrc (#4203)
- Widgets: implement WST_VISIBLE state to show/hide widgets (#2919)
- Find File: add Follow symlinks option (#2020)
-
VFS
- extfs: support unrar-6 (#4154)
- extfs: support official 7z binary (7zz) (#4239)
- ftpfs: apply file list parser from lftp project (#2841, #3174)
-
Editor
- Word completion: get candidates from all open files (#4160)
- etags: get rid of hardcoded list length and window width (#4132)
- Update syntax files:
- python (#4140)
- Add syntax highlighting:
- Verilog and SystemVerilog? header files (#4215)
- JSON (#4250)
- openrc-run scripts (#4246)
-
Misc
- Filehighlight of c++ and h++ files as sources (#4194)
- Filehighlight of JSON files as documents (#4250)
- Support of alacritty terminal emulator (https://github.com/alacritty/alacritty) (#4248)
- Support of foot terminal emulator (https://codeberg.org/dnkl/foot) (#4251)
- Support of (alt+)shift+arrow keys in st terminal emulator (st.suckless.org) (#4267)
- Mouse support in screen: don't check variable (#4233)
- mc.ext: support fb2 e-books (#4167)
- ext.d: use mediainfo to view info about various media files (#4167)
- Remove OS/distro-specific package-related stuff from source tree (#4217)
-
Fixes
- FTBFS against NCurses on OS X 10.9.5 (#4181)
- Segfault on dialog before panels get visible (#4244)
- Crash if shadow is out of screen (build against NCurses) (#4192)
- Crash in search (#4222)
- Crash on startup with enabled subshell in FreeBSD (workaround) (#4213)
- Hang on start randomly with zsh as subshell (#4198)
- If command line is invisible it's partially displayed (#4182)
- Broken handling of zip archives (#4180, #4183)
- Broken handling of jar files as zip archives (#4223)
- Timestamps of symlinks, sockets, fifos, etc are not preserved after copy/move (#3985)
- %view action in the user menu doesn't work on no-exec filesystem (#4242)
- Hardlinks are not colored by file type or extension (#3375)
- mcedit: silent macro makes terminal disrupted (#4171)
- mcedit: disrupting of TAGS file path (#4207)
- vfs: unable to browse compressed tar archives (#4191)
- sftpfs vfs: CVE-2021-36370: server fingerprint isn't verified (discovered by AUT-milCERT during an audit of open source software) (#4259)
- ftpfs vfs: month of file is always January (#4260)
- Tests: log files are written by libcheck and automake simultaneously (#3986)
- Record
openSUSE-SU-2022:0061-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11580-1 No score
mc-4.8.27-1.1 on GA media
These are all security issues fixed in the mc-4.8.27-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11580-1- Updated
- 2026-11-02
OSVUSN-5160-1 No score
mc vulnerability
It was discovered that Midnight Commander would not check server fingerprints when establishing an SFTP connection. If a remote attacker were able to intercept communications this flaw could be exploited to impersonate the SFTP server.
- Record
USN-5160-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
mcAzure Linux:2 |
before 4.8.27-1 | 4.8.27-1 |
mcDebian:12 |
before 3:4.8.27-1 | 3:4.8.27-1 |
mcDebian:13 |
before 3:4.8.27-1 | 3:4.8.27-1 |
mcDebian:14 |
before 3:4.8.27-1 | 3:4.8.27-1 |
mcMageia:8 |
before 4.8.27-1.mga8 | 4.8.27-1.mga8 |
mcopenEuler:20.03-LTS-SP1 |
before 4.8.28-1.oe1 | 4.8.28-1.oe1 |
mcopenEuler:20.03-LTS-SP3 |
before 4.8.28-1.oe1 | 4.8.28-1.oe1 |
mcopenEuler:22.03-LTS |
before 4.8.28-1.oe2203 | 4.8.28-1.oe2203 |
mcUbuntu:Pro:14.04:LTS |
before 3:4.8.11-1ubuntu0.1~esm1, plus listed versions 3:4.8.5-13:4.8.10-43:4.8.11-1 |
3:4.8.11-1ubuntu0.1~esm1 |
mcUbuntu:Pro:16.04:LTS |
before 3:4.8.15-2ubuntu0.1~esm1, plus listed versions 3:4.8.13-33:4.8.15-2 |
3:4.8.15-2ubuntu0.1~esm1 |
Show 6 moreShow less
| Package | Affected | Fixed |
|---|---|---|
mcUbuntu:Pro:18.04:LTS |
before 3:4.8.19-1ubuntu0.1~esm1, plus listed versions 3:4.8.19-1 |
3:4.8.19-1ubuntu0.1~esm1 |
mcUbuntu:Pro:20.04:LTS |
before 3:4.8.24-2ubuntu1+esm1, plus listed versions 3:4.8.22-1build13:4.8.23-13:4.8.24-2ubuntu1 |
3:4.8.24-2ubuntu1+esm1 |
mcUbuntu:22.04:LTS |
before 3:4.8.27-1, plus listed versions 3:4.8.26-1.1 |
3:4.8.27-1 |
mcSUSE:Package Hub 15 SP3 |
before 4.8.27-bp153.2.3.1 | 4.8.27-bp153.2.3.1 |
mcopenSUSE:Leap 15.3 |
before 4.8.27-bp153.2.3.1 | 4.8.27-bp153.2.3.1 |
mcopenSUSE:Tumbleweed |
before 4.8.27-1.1 | 4.8.27-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-36370 is a high vulnerability (CVSS 7.5) in Midnight-commander Midnight Commander, published August 30, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.99%, the 80th percentile. Fixed in mc 4.8.27-1.
References
github.com/MidnightCommander/mc/blob/master/src/vfs/sftpfs/connection.c
github.com/MidnightCommander/mc/blob/5c1d3c55dd15356ec7d079084d904b7b0fd58d3e/src/vfs/sftpfs/connection.c
sourceforge.net/projects/mcwin32/files
midnight-commander.org
docs.ssh-mitm.at/CVE-2021-36370.html
mail.gnome.org/archives/mc-devel/2021-August/msg00008.html
Show 13 moreShow less
nvd.nist.gov/vuln/detail/CVE-2021-36370
github.com/advisories/GHSA-j8px-qjm3-fx72
security-tracker.debian.org/tracker/CVE-2021-36370
advisories.mageia.org/MGASA-2022-0086.html
bugs.mageia.org/show_bug.cgi?id=30107
lists.opensuse.org/archives/list/[email protected]/thread/5SJPZ2MSI7IPFCS5TFZZVXF4NN6XKYKJ
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1771
ubuntu.com/security/CVE-2021-36370
github.com/MidnightCommander/mc/commit/9235d3c232d13ad7f973346077c9cf2eaa77dc5f
ubuntu.com/security/notices/USN-5160-1
cve.org/CVERecord?id=CVE-2021-36370
bugzilla.suse.com/1190180
suse.com/security/cve/CVE-2021-36370