CVE-2026-77682

epiphany: JavaScript code injection in autofill via unsanitized CSS selector from element id

Published Nov 27, 2026 CVSS 3.1 · 7.1 High EPSS < 1% KEV · Not listed
Description
A code injection vulnerability exists in Epiphany when the user invokes form autofill from the context menu on a page containing a malicious HTML form.

In embed/web-process-extension/resources/js/ephy_autofill.js, getSelector() builds a CSS selector by directly interpolating an element's id attribute:

path.unshift(`#${el.id}`);

When the user selects an autofill entry, the browser process in embed/ephy-web-view.c previously constructed JavaScript using sprintf with the selector embedded in single quotes:

EphyAutofill.fill(PAGE_ID, 'SELECTOR', FILL_CHOICE);

Because SELECTOR comes from attacker-controlled page content and is not escaped, a crafted id such as a'); PAYLOAD; var _=(' breaks out of the string literal and executes arbitrary JavaScript when the script is evaluated.

The injected code runs in Epiphany's private autofill script world, which hosts EphyAutofill credential APIs and password manager save/request handlers. The reporter demonstrated a proof of concept that injects credentials into another domain and uses Ephy.permissionsManager to enumerate domains with special permissions. Full exfiltration of all saved passwords was not demonstrated but may be possible given the privileges of this context.

Exploitation requires the victim to visit a malicious page, right-click on a form field, and choose an Autofill context menu item. This is a deliberate user action but does not require installing software or entering credentials manually.

Affected versions: Epiphany >= 47.beta.
Fixed upstream in epiphany 50.6 and 49.9 via merge request !2147, which replaces sprintf-based script evaluation with a WebKit user message and jsc_value_object_invoke_method() passing the selector as a typed string argument.
Upstream report: https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921

Analysis

AI-generated

Technical impact

Epiphany has a code injection flaw that allows a malicious web page to craft an element id that terminates the JavaScript string used by the autofill feature. When a user chooses a form autofill action, the browser inserts the unsanitized selector into a single‑quoted string and evaluates it, so the attacker can execute arbitrary JavaScript. The injected code runs in Epiphany’s privileged autofill script world, giving access to credential APIs and potential password enumeration.

Affected Systems

The flaw affects the GNOME Project’s Epiphany web browser, specifically all versions from 47.beta onward, until the fix was merged in 50.6 and 49.9. The affected products are Epiphany and its embedded WebKit components used in desktop GTK environments.

Risk and Exploitability

The CVSS score of 7.1 denotes a high severity vulnerability. Exploitation requires a user to visit a web page, trigger the context‑menu autofill action, and is thus a user‑interaction scenario. The EPSS is not available, and the vulnerability is not listed in CISA’s KEV catalog. Still, because the injected code executes with privileged access to credential handling APIs, an attacker could read or inject stored passwords and enumerate protected domains, making the risk significant for frequent users of autofill.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Epiphany to version 50.6 or newer to replace the unsafe JavaScript construction with typed argument invocation.
  • If an upgrade is not immediately possible, disable the autofill feature or the context‑menu autofill entry through Epiphany’s settings.
  • Avoid enabling the context‑menu autofill on untrusted or unfamiliar web pages and monitor the browser for unexpected credential changes.

Generated by OpenCVE AI on November 27, 2026 at 08:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description A code injection vulnerability exists in Epiphany when the user invokes form autofill from the context menu on a page containing a malicious HTML form. In embed/web-process-extension/resources/js/ephy_autofill.js, getSelector() builds a CSS selector by directly interpolating an element's id attribute: path.unshift(`#${el.id}`); When the user selects an autofill entry, the browser process in embed/ephy-web-view.c previously constructed JavaScript using sprintf with the selector embedded in single quotes: EphyAutofill.fill(PAGE_ID, 'SELECTOR', FILL_CHOICE); Because SELECTOR comes from attacker-controlled page content and is not escaped, a crafted id such as a'); PAYLOAD; var _=(' breaks out of the string literal and executes arbitrary JavaScript when the script is evaluated. The injected code runs in Epiphany's private autofill script world, which hosts EphyAutofill credential APIs and password manager save/request handlers. The reporter demonstrated a proof of concept that injects credentials into another domain and uses Ephy.permissionsManager to enumerate domains with special permissions. Full exfiltration of all saved passwords was not demonstrated but may be possible given the privileges of this context. Exploitation requires the victim to visit a malicious page, right-click on a form field, and choose an Autofill context menu item. This is a deliberate user action but does not require installing software or entering credentials manually. Affected versions: Epiphany >= 47.beta. Fixed upstream in epiphany 50.6 and 49.9 via merge request !2147, which replaces sprintf-based script evaluation with a WebKit user message and jsc_value_object_invoke_method() passing the selector as a typed string argument. Upstream report: https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921 A code injection vulnerability exists in Epiphany when the user invokes form autofill from the context menu on a page containing a malicious HTML form. In embed/web-process-extension/resources/js/ephy_autofill.js, getSelector() builds a CSS selector by directly interpolating an element's id attribute: path.unshift(`#${el.id}`); When the user selects an autofill entry, the browser process in embed/ephy-web-view.c previously constructed JavaScript using sprintf with the selector embedded in single quotes: EphyAutofill.fill(PAGE_ID, 'SELECTOR', FILL_CHOICE); Because SELECTOR comes from attacker-controlled page content and is not escaped, a crafted id such as a'); PAYLOAD; var _=(' breaks out of the string literal and executes arbitrary JavaScript when the script is evaluated. The injected code runs in Epiphany's private autofill script world, which hosts EphyAutofill credential APIs and password manager save/request handlers. The reporter demonstrated a proof of concept that injects credentials into another domain and uses Ephy.permissionsManager to enumerate domains with special permissions. Full exfiltration of all saved passwords was not demonstrated but may be possible given the privileges of this context. Exploitation requires the victim to visit a malicious page, right-click on a form field, and choose an Autofill context menu item. This is a deliberate user action but does not require installing software or entering credentials manually. Affected versions: Epiphany >= 47.beta. Fixed upstream in epiphany 50.6 and 49.9 via merge request !2147, which replaces sprintf-based script evaluation with a WebKit user message and jsc_value_object_invoke_method() passing the selector as a typed string argument. Upstream report: https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921
Title epiphany: epiphany: JavaScript code injection in autofill via unsanitized CSS selector from element id epiphany: JavaScript code injection in autofill via unsanitized CSS selector from element id
References
Type Values Removed Values Added
First Time appeared Gnome
Gnome epiphany
Vendors & Products Gnome
Gnome epiphany
Type Values Removed Values Added
Description A code injection vulnerability exists in Epiphany when the user invokes form autofill from the context menu on a page containing a malicious HTML form. In embed/web-process-extension/resources/js/ephy_autofill.js, getSelector() builds a CSS selector by directly interpolating an element's id attribute: path.unshift(`#${el.id}`); When the user selects an autofill entry, the browser process in embed/ephy-web-view.c previously constructed JavaScript using sprintf with the selector embedded in single quotes: EphyAutofill.fill(PAGE_ID, 'SELECTOR', FILL_CHOICE); Because SELECTOR comes from attacker-controlled page content and is not escaped, a crafted id such as a'); PAYLOAD; var _=(' breaks out of the string literal and executes arbitrary JavaScript when the script is evaluated. The injected code runs in Epiphany's private autofill script world, which hosts EphyAutofill credential APIs and password manager save/request handlers. The reporter demonstrated a proof of concept that injects credentials into another domain and uses Ephy.permissionsManager to enumerate domains with special permissions. Full exfiltration of all saved passwords was not demonstrated but may be possible given the privileges of this context. Exploitation requires the victim to visit a malicious page, right-click on a form field, and choose an Autofill context menu item. This is a deliberate user action but does not require installing software or entering credentials manually. Affected versions: Epiphany >= 47.beta. Fixed upstream in epiphany 50.6 and 49.9 via merge request !2147, which replaces sprintf-based script evaluation with a WebKit user message and jsc_value_object_invoke_method() passing the selector as a typed string argument. Upstream report: https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921
Title epiphany: epiphany: JavaScript code injection in autofill via unsanitized CSS selector from element id
Weaknesses CWE-94
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N'}

threat_severity

Important

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
fedora
Published
Updated
Nov 30, 2026, 3:55 PM
Reserved
Aug 21, 2026, 5:29 AM
Status
Received
Published
Nov 27, 2026, 7:17 AM
Modified
Nov 30, 2026, 4:17 PM
Severity
Important
Public date
Aug 21, 2026, 12:00 AM