Security mailing lists by PureSourceCode

CVE-2026-27167

MEDIUM 5.9CVSS 3.1

Gradio: Mocked OAuth Login Exposes Server Credentials and Uses Hardcoded Session Secret

Gradio is an open-source Python package designed for quick prototyping. Starting in version 4.16.0 and prior to version 6.6.0, Gradio applications running outside of Hugging Face Spaces automatically enable "mocked" OAuth routes when OAuth components (e.g. gr.LoginButton) are used. When a user visits /login/huggingface, the server retrieves its own Hugging Face access token via huggingface_hub.get_token() and stores it in the visitor's session cookie. If the application is network-accessible, any remote attacker can trigger this flow to steal the server owner's HF token. The session cookie is signed with a hardcoded secret derived from the string "-v4", making the payload trivially decodable. Version 6.6.0 fixes the issue.

Published
27 Feb 2026
Last modified
17 Jun 2026
Assigned by
security-advisories@github.com
NVD status
Analyzed
Weakness
CWE-522CWE-798
Also known as
GHSA-h3h8-3v2v-rg7mPYSEC-2026-63
Sources
NVDJSONOSV GHSA-h3h8-3v2v-rg7mJSONOSV PYSEC-2026-63JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
OSV PyPA CVSS 3.1 MEDIUM 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD security-advisories@github.com (Secondary) CVSS 3.1 NONE 0.0 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:N
OSV GitHub CVSS 3.1 NONE 0.0 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD gradio_project gradio
cpe:2.3:a:gradio_project:gradio:*:*:*:*:*:python:*:*
>= 4.16.0, < 6.6.0 6.6.0
OSV PyPI gradio >= 4.16.0, < 6.6.0 6.6.0

References

History

  • 25 Nov 2026 21:01 UTC · NVD: first stored (published 27 Feb 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 27 Feb 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 1 Mar 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.