Skip to content

API Key is exposed in browser autofill/autocomplete suggestion dropdown on integration setup form #78965

Closed

Description

@Modi2918

Description

When entering an API key in the integration setup form (Anthropic provider), the API key value appears in the browser autocomplete/autofill suggestion dropdown in plain text. This can expose sensitive credentials to anyone with access to the browser session or screen.

The API key field should behave like a secure password field and should not display previously entered values as suggestions.

Step-by-step reproduction instructions

Steps to Reproduce:

Open the AI integration settings page.
Navigate to the Anthropic API key setup section.
Click inside the “API KEY” input field.
Browser displays previously entered API keys in autocomplete suggestions.

Actual Result:
Previously entered API keys are visible in browser suggestion/autocomplete dropdown.

Expected Result:
API keys should never appear in autocomplete suggestions or stored browser history.
The field should:

Use secure input masking (type="password")
Disable autocomplete (autocomplete="off" or autocomplete="new-password")
Prevent sensitive values from being exposed in browser suggestions

Impact:

Sensitive API credentials can be exposed visually
Risk of credential leakage during screen sharing or shared device usage
Security/privacy concern for users managing third-party integrations

Suggested Fix:

Change API key input field to password type
Disable browser autocomplete/autofill for the field
Optionally add a show/hide toggle for usability
Ensure keys are not cached in frontend storage unnecessarily

Screenshots, screen recording, code snippet

bug.video.mp4

Environment info

Browser: Chrome (observed)
Module: AI Integration Settings

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. added
    [Type] Bug
    on Jun 5, 2026
  2. Mustafabharmal commented on Jun 5, 2026

    @Mustafabharmal
    Contributor

    I think it is similar to #78945 which got fixed in #78946, can you check with the latest trunk branch to reproduce this issue?

  3. Modi2918 commented on Jun 5, 2026

    @Modi2918
    Author

    https://core.trac.wordpress.org/ticket/65303 This is my ticket on wordpress.org

  4. himanshupathak95 commented on Jun 5, 2026

    @himanshupathak95
    Contributor

    @Mustafabharmal, I reproduced it on trunk, and the autocomplete is still appearing, and also the key is not hidden. We need to add type="password" to the text control.

    I'll be raising a PR shortly with this.

  5. added
    [Status] In Progress
    on Jun 5, 2026
  6. added
    [Feature] Connectors screen
    on Jun 5, 2026
  7. jorgefilipecosta commented on Jul 10, 2026

    @jorgefilipecosta
    Member

    Fixed at #78946.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

[Feature] Connectors screen[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions