New issue
Advanced search Search tips

Issue 815126 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac , Fuchsia
Pri: ----
Type: Bug



Sign in to add a comment

Password manager saves latest known form state rather than state at submission time

Reported by jbmu...@gmail.com, Feb 23 2018

Issue description

VULNERABILITY DETAILS

When storing/updating credentials from a login form, Chrome offers to store
the latest state of the input fields rather than the form state that was actually
submitted (race condition).
With a carefully crafted XSS attack, an attacker could dynamically change login
form values right after user submission, but before Chrome actually prompts the
user with the "save credentials" window. A user not paying attention would be
storing different credentials into Chrome saved passwords.
On subsequent logins, a user not paying attention to the autofilled form could
automatically log in as a different person using the credentials injected by the
attacker. The user could then be unknowingly performing harmful actions, such
as shopping or chatting while not realizing s/he logged in as someone else. Unlikely,
but that could be exploited.

VERSION

Chrome Version: 63.0.3239.132 (Build officiel) (64 bits)
Operating System: Mac OS X 10.12.6 (16G29)

REPRODUCTION CASE

Suppose you're attempting to log in as "jane@gmail.com" with password "1234abcd",
which would be valid on a given website. If you quickly change the email and/or pass
fields of that form to other values (ie. login: "robert@some-domain.com" and
pass "BobPassWord") *right* after submitting (with click or enter
key), then Chrome will offer to store these updated values (Bob's credentials)
*rather than* the values in the form at the time of submission (Jane's credentials).
When logging out and attempting to log back in, the form would be autofilled
with Bob's credentials, although the login attempt would have been succesful using Jane's credentials.
This looks like a race condition where Chrome stores the latest known state
of the form rather than the state that was actually used for the actual
form submission.

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION

n/a
 
Cc: vabr@chromium.org dvadym@chromium.org
Components: UI>Browser>Passwords
Labels: Security_Impact-Stable OS-Android OS-Chrome OS-Fuchsia OS-iOS OS-Linux OS-Mac OS-Windows
Summary: Security: Password manager saves latest known form state rather than state at submission time (was: Security: race condition when saving login form credentials (latest known form state being stored rather than state at submission time))
In terms of behavior, this may or may not be a functional issue.

I do not think this is very plausible as a security vulnerability. This attack has the precondition that the site has been compromised by an XSS attack. With that precondition, an attacker need not bother hoping you'll store his "planted" credentials, since he can instead simply send the *actual* credentials the victim has typed to a server under his control. Given the actual credentials, the attacker can reliably abuse the victim's account.

Comment 2 by wfh@chromium.org, Feb 23 2018

Components: Security
Labels: -Type-Bug-Security -Restrict-View-SecurityTeam -Security_Impact-Stable Type-Bug
Summary: Password manager saves latest known form state rather than state at submission time (was: Security: Password manager saves latest known form state rather than state at submission time)
looks to me like, at most, a functional bug that saving credentials should avoid toctou, but I don't think this can have a user security impact without an additional XSS, as stated in #1. Does the 'save credentials' dialog display the origin that it's saving for? In which case, this would be an additional mitigation.

Comment 3 by dvadym@chromium.org, Feb 26 2018

Cc: kolos@chromium.org battre@chromium.org
The origin is displayed only when credentials are saved from cross-origin iframes, otherwise it's written "Do you want Chrome to save your password for this site?"
Status: WontFix (was: Unconfirmed)
Distinguishing valid JS from attacker injected JS isn't in the scope of the password manager. In this scenario the attacker can just call navigator.credentials.store at any point and prompt the user with any credential.
Cc: -vabr@chromium.org

Sign in to add a comment