{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "47.0"
                  },
                  {
                    "fixed": "49.9"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "introduced": "50.0"
                  },
                  {
                    "fixed": "50.6"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          },
          "events": [
            {
              "introduced": "033c855991214f38e6ad8fd73f2121678636d2ce"
            },
            {
              "fixed": "98a9b98b41d7f1398d344801aa35b43436a80db2"
            },
            {
              "introduced": "9c213766488217ada3dd095d3d9f64a17eebfd24"
            },
            {
              "fixed": "6eaf573ea9838bcaeb33c52388d0b763373f012a"
            }
          ],
          "repo": "https://gitlab.gnome.org/gnome/epiphany",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "fedora",
    "cwe_ids": [
      "CWE-94"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77682.json"
  },
  "details": "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.\n\nIn embed/web-process-extension/resources/js/ephy_autofill.js, getSelector() builds a CSS selector by directly interpolating an element's id attribute:\n\n    path.unshift(`#${el.id}`);\n\nWhen 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:\n\n    EphyAutofill.fill(PAGE_ID, 'SELECTOR', FILL_CHOICE);\n\nBecause 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.\n\nThe 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.\n\nExploitation 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.\n\nAffected versions: Epiphany \u003e= 47.beta.\nFixed 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.\nUpstream report: https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921",
  "id": "CVE-2026-77682",
  "modified": "2026-11-27T07:45:28.901239977Z",
  "published": "2026-11-27T06:46:35.599Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://access.redhat.com/security/cve/CVE-2026-77682"
    },
    {
      "type": "REPORT",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2520893"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77682.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://gitlab.gnome.org/GNOME/epiphany"
    },
    {
      "type": "REPORT",
      "url": "https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921"
    },
    {
      "type": "FIX",
      "url": "https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/2147"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-77682"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "epiphany: JavaScript code injection in autofill via unsanitized CSS selector from element id"
}