Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Security of autofill #590

Closed
alastc opened this issue Nov 23, 2017 · 16 comments
Closed

Security of autofill #590

alastc opened this issue Nov 23, 2017 · 16 comments

Comments

@alastc
Copy link
Contributor

alastc commented Nov 23, 2017

I picked up a comment from @StommePoes on twitter (thread) about the security of autofill.

This is to a great extent an issue with the browser implementations, but it is relevant because if the browsers don't solve it then autofill is likely to go-away. That would undermine the SC.

For example, if the browser auto-fills fields by default, any site could hide input fields out of view and collect your credit card details.

I think current implementations wait for you to fill in one field (e.g. name) and then it fills in the others, but again the site can hide fields. This example video from @anttiviljami shows it working now.

There are also issues with tracking scripts sucking data from the page, even if a form isn't submitted they can still get the auto-filled data.

Apparently most recent security advice is to disable autofill in your browser.

I have a few suggestions:

  • Find someone in W3C with knowledge of what browsers are doing about this (I couldn't find much from a quick search).
  • Put a note in the understanding that there are potential security issues.
  • Make clear to anyone currently implementing a browser extension they need to try and mitigate these effects.

Hopefully the browsers will solve this (e.g. only fill in visible fields, only on request, only for trusted domains), but there could be reasons that is hard or impossible to do.

@StommePoes
Copy link

StommePoes commented Nov 23, 2017

One solution would be, in a browser setting section dedicated to autofill and similar, is something like the panel from NoScript: users could, with a checkbox system (rather than a more difficult type-in whitelist system) choose, per domain, whether to allow what data to be auto-sent: for example I may want username and password for github, but would have no reason to allow my home address or credit card. Basically a which-info-per-domain setting.

A browser-owned popup similar to "blah.com wants to send notifications. Block/Allow" could be another method (only for those who've turned on autofill): "send full autofill data to foo.com? Yes/No/adjust settings" for example. In adjust-settings you could choose what exactly to send to foo.com, while "no" is for "I'm just reading a news article, they get nothing from me if I go to post a comment using a form."

The SC is meant to help people with a particular set of disabilities, though things like auto-fill are also a convenience for millions without. It would be unfair to offer an assistance to those who need it which may compromise their safety and security.

I'm sure nobody can make autofill airtight (perfect the enemy of the good, but also making settings too complicated would defeat the purpose of the SC as well), but I do feel it can be improved at a basic level, enough for me to change my mind and recommend it to folks.

@patrickhlauke
Copy link
Member

patrickhlauke commented Nov 23, 2017

To use "standardsy" language, the problem of how browsers securely handle autocomplete/autofill seems "orthogonal" to what the SC is trying to achieve in terms of getting authors to identify more concretely what inputs/controls are for.

And it's definitely a problem that browsers need to solve, and not something that can or should be tackled in WCAG. Not sure if a handwavy "but beware this can have security issues..." type note would be appropriate either, unless it's maintained from now on to point to concrete external sources that authors can check that explain the problem in detail (a level of detail that probably goes beyond what we want in the understanding doc here) and what the status is of browsers tackling in.

As part of this seems to align with HTML5, suggest something should be filed against the spec there with regards to security. I'd also ping @mikewest who may know the best person to speak to more deeply about this.

@alastc
Copy link
Contributor Author

alastc commented Nov 23, 2017

And it's definitely a problem that browsers need to solve, and not something that can or should be tackled in WCAG.

Agreed, this is primarily a browser issue. I just meant that if it is a big issue then that technique for applying meta-data might disappear. Also, if an extension implements a similar feature, it should track the issues the browsers deal with.

@johnfoliot
Copy link

johnfoliot commented Nov 24, 2017 via email

@johnfoliot
Copy link

johnfoliot commented Nov 26, 2017 via email

@mbgower
Copy link
Contributor

mbgower commented Nov 26, 2017

@johnfoliot

Don't confuse "autocomplete" (of a single field) with "autofill" (of multiple fields in a form). I have not seen any implementations of "autocomplete" that will automatically fill in single fields without interaction, or fill in hidden fields

Just a few points on how the distinction in wording isn't so clear (although on rereading, I get the distinction of the actions being discussed). In recent HTML5.3, some of this is covered in autocomplete through the autofill expectation mantle.

The "off" keyword indicates either that the control’s input data is particularly sensitive (for example the activation code for a nuclear weapon); or that it is a value that will never be reused (for example a one-time-key for a bank login) and the user will therefore have to explicitly enter the data each time, instead of being able to rely on the user agent to prefill the value for him; or that the document provides its own autocomplete mechanism and does not want the user agent to provide autocompletion values.

When an element’s autofill field name is "off", the user agent should not remember the control’s data, and should not offer past values to the user.
In addition, when an element’s autofill field name is "off", values are reset when traversing the history.
Banks frequently do not want user agents to prefill login information:

A concern is that things like credit card info, including the security feature (cc-csc), do not appear to be treated any differently than other keywords, and do not even have a default value of "off". There is also some concern that retention could also be abused through the "form owner" construction.

If the autocomplete attribute is omitted, the default value corresponding to the state of the element’s form owner’s autocomplete attribute is used instead (either "on" or "off"). If there is no form owner, then the value "on" is used.

Not suggesting this is a show stopper (or even that my interpretation of the draft spec is correct), but it is a consideration, and we may need some language around security, especially if authors are required to follow a normative list.

Also, the last line:

The problematic user-interaction exists and needs to be mitigated whether you recommend the use of the autocomplete attributes or not.

But the current intent isn't to recommend the attributes. It's to require them, right? At the risk of repeating myself, it's the combination -- of requiring authors to provide the use of attributes and making a normative list of attribute values that must be used -- that is the concern.

@StommePoes
Copy link

StommePoes commented Nov 28, 2017

This may be off-topic, and if there's an area (probably not necessarily wcag2.1 even) where this is already being addressed, send it my way.

I was reading another 2.1 thread on more coga stuff and this sentence went by (as a comment, not necesarily any speccy language):

"Reduce Steps: Provide settings, shortcuts or other methods for return users so they can reduce the number of steps needed to perform a task. Example: A shopping cart that saves and pre-fills the address and credit card information."

This did freak me a bit, but I am assuming that while the author would be adding attributes and values that could facilitate the above, the shopping cart wouldn't be saving that (most shops refuse to store that stuff for good reason) but the user agent, correct?

As a J Random, Know-Nothing Developer, if I read a spec that suggests or mandates that I set something up so someone's user-agent (or anything else) saves data or tracks where people have been (to know for example if someone is a first-timer or a returnee, as there were some suggestions of offering different amounts of controls based on user familiarity), I think I would still be uncomfortable with the idea that there's WCAG to help end-users and completely separately-- "orthogonally" is the issue of how UAs implement stuff. (I'm still waiting for a CSUN+DEFCON thing to show up somewhere...)

I'm terrified enough to be responsible for data users give me directly, but my responsibility is clear there. I also should be responsible for data taken from users by any third-party scripts/ads I add to my sites, esp if I allow malicious ones as most of the big publishers have been doing.
But where do I, J Developer, stand if I am following any future SC that tells me to instruct browsers/UAs to take/hold/change layouts based on user data (obviously assuming on the other end the user has also said they want/need this)? Am I responsible? Is it so outside WCAG because "well that's up to the browsers"? Just curious.

edit: or, here's the question. @alastc worried that maybe autocomplete/autofill could be removed from browsers (unlikely), but what about the other end-- developers who would like to follow WCAG but decide they implementation by UAs isn't safe for their users? That would kinda suck if you'd otherwise really like to fulfill the SC (either personally or for legal reasons).

@alastc
Copy link
Contributor Author

alastc commented Nov 28, 2017

I'm missing the context a bit (i.e. who's being required to do this at what sort of level), but I've come across many sites that do save your info. Amazon's an obvious example, one click buying etc.

I don't think WCAG would get into requiring that sort of thing, but if we can provide higher-level guidance somewhere else, where that is framed as 'when appropriate' and noting the security implications, it is good usability advice (which helps people with cognitive issues even more).

@johnfoliot
Copy link

johnfoliot commented Nov 28, 2017 via email

@joshueoconnor
Copy link
Contributor

@johnfoliot @alastc Where do you think this is at? Are there further action items that need to happen?

@alastc
Copy link
Contributor Author

alastc commented Jan 3, 2018

Another example of privacy issues of autofil came up recently, but I think as long as no SC demands automatic-autofil (some user interaction is needed, even just to click a button in the browser that does the autofil) we are ok.

In the Understanding doc it would help to mention that, but it is really aimed at user-agent creators rather than content authors.

@johnfoliot
Copy link

johnfoliot commented Jan 4, 2018 via email

@StommePoes
Copy link

Would be good on my end as well-- anything an SC requires means any website that feels it must adhere to WCAG2.1 for legal or whatever reasons, it would be a requirement there as well. So requiring an experience rather than one technique sounds better.

@jnurthen
Copy link
Member

jnurthen commented Jan 4, 2018 via email

@jnurthen
Copy link
Member

jnurthen commented Jan 4, 2018 via email

@awkawk
Copy link
Member

awkawk commented Jan 21, 2018

(Official WG response)
While there are some privacy and security concerns with automatically filling in inputs (without the user wanting to), this is ultimately a user-agent/browser issue. The way to solve the issue is to make sure the user agrees to fields being populated (e.g. clicks a button in the browser interface), and avoid filling in hidden inputs. We can note the concern in the understanding document, but if change is needed it is up to the browsers and Web Platform working group to resolve.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants