Skip to content
Access control Disclosed report Intermediate CVE-2019-7639

A vulnerability classified as critical has been found in gsi-openssh-server 7.9p1 on Fedora (Connectivity Software) on server (http://95.217.64.181:22

When PermitPAMUserChange is enabled in gsi-openssh-server's sshd_config, the server accepts logins with a valid username and an incorrect password. An attacker could therefore log in as any existing user, including root, without knowing the password.

ibrahim71192 Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 34 days
  • Disclosed after 2 months

Summary:

" hello " vulnerability: GSI-OPENSSH-SERVER 7.9P1 ON FEDORA /ETC/GSISSH/SSHD_CONFIG CREDENTIALS MANAGEMENT Description of problem: A vulnerability classified as critical has been found in gsi-openssh-server 7.9p1 on Fedora (Connectivity Software) on server (http://95.217.64.181:22). This affects some unknown functionality of the file /etc/gsissh/sshd_config. The manipulation with an unknown input leads to a privilege escalation vulnerability. CWE is classifying the issue as CWE-255. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:

An issue was discovered in gsi-openssh-server 7.9p1 on Fedora 29. If PermitPAMUserChange is set to yes in the /etc/gsissh/sshd_config file, logins succeed with a valid username and an incorrect password, even though a failure entry is recorded in the /var/log/messages file. The bug was discovered 02/08/2019. The weakness was released 02/08/2019. This vulnerability is uniquely identified as CVE-2019-7639 since 02/08/2019. It is possible to initiate the attack remotely. No form of authentication is needed for exploitation. Technical details of the vulnerability are known, but there is no available exploit. The attack technique deployed by this issue is T1552 according to MITRE ATT&CK.

If PermitPAMUserChange is set to yes in the sshd_config for gsi-openssh-server, anyone is allowed to login to the system with existing user even if they provide incorrect password

Version-Release number of selected component (if applicable): 7.9p1

How reproducible: Always

Steps to Reproduce:

  1. Install gsi-openssh-server
  2. Initialize rsa, ecdsa, ed25519 keys for gsi-openssh server using gsissh-keygen
  3. Set PermitPAMUserChange to yes in /etc/gsissh/sshd_config
  4. Run /usr/sbin/gsisshd
  5. Try to connect to the system using Putty with user "root" and some incorrect password like "test1234" (The actual password for root on the test system was root1234)

Actual results: User gets logged in even though there is a failure entry in /var/log/messages for user authentication

Expected results: User should not be able to login unless he provides the correct password

Additional info: its possible that earlier versions might also be vulnerable.

https://nvd.nist.gov/vuln/detail/CVE-2019-7639

Impact

This is going to have an impact on confidentiality, integrity, and availability

Attachments

Screenshot_from_2022-10-07_21-49-17.png
Screenshot_from_2022-10-07_21-49-17.png From the original on HackerOne

The original report as published on HackerOne, by ibrahim71192. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 a logic error in the PAM authentication path when PermitPAMUserChange is enabled, causing the password check result to be ignored.

Impact

An attacker could log in as any existing user, including root, without the correct password, affecting confidentiality, integrity and availability; the text notes a failure is still logged, and no exploit code is available.

What the attacker needed

PermitPAMUserChange set to yes; gsi-openssh-server 7.9p1 on Fedora 29; network access to the SSH port; knowledge of an existing username

The fix

The server should reject the login unless the supplied password is correct, even when PermitPAMUserChange is enabled.

How it was found

  1. Install gsi-openssh-server.
  2. Generate the server's RSA, ECDSA and ED25519 keys with gsissh-keygen.
  3. Set PermitPAMUserChange to yes in /etc/gsissh/sshd_config.
  4. Start the gsisshd daemon.
  5. Connect with an SSH client as an existing user, such as root, using a wrong password.

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.

This is a login server that is supposed to check your password before letting you in. A setting called PermitPAMUserChange was turned on, and with that setting the server stopped checking the password properly. So anyone who knew a username, such as root, could get in by typing any wrong password.

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 from Nextcloud

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.