apache / apache/cloudstack

[Hardening] F-06: 2FA Field Set as Password Causes Password Manager Issues.

Open
#13,337 3 comments 0 reactions 0 assignees View on GitHub
component:UI hardening
Dominant language
Java
Stars
3.1k
Forks
1.4k
Avg merge
6d 19h
Merged PRs (30d)
32

Description

### The required feature described as a wish

Image

**Description:** The 2FA input is defined as type="password". Password managers treat it like a regular password field, so they may save or autofill the 2FA code. This can overwrite the stored password and lock the user out of their account. The field was likely set this way to hide the Static PIN from bystanders or during screen sharing.

**Affected Components:** Management UI

**Impact:** Password managers may replace saved passwords with 2FA codes. This can lock users out and lead them to choose weaker passwords or store them insecurely.

**Steps to Reproduce:**
- Log in to the CloudStack Management UI with a user that has 2FA enabled.
- Enter valid credentials and continue to the 2FA screen.
- Inspect the 2FA input field in the browser’s developer tools.
- Confirm it is set to type="password".

**Recommended Remediation:** Change the 2FA input field to type="number" and add autocomplete="one-time-code". This informs password managers of the field's actual meaning.

Also, consider combining the password and 2FA into a single form. This way, attackers can’t tell which part failed, making password attacks harder.

Contributor guide

Open the contributing guide

Research direction

Start with the CloudStack Management UI's 2FA login form described in issue #13337 and review merged pull request #13723 to see the work already completed. Done means the 2FA field is identified to password managers as a one-time code rather than a regular password, while the separate form-combination suggestion remains a broader consideration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.