Bug 2519497 (CVE-2026-76235) - CVE-2026-76235 cockpit-ws: cockpit: cockpit-ws: unauthenticated remote memory leak via CockpitLang cookie in send_login_html
Summary: CVE-2026-76235 cockpit-ws: cockpit: cockpit-ws: unauthenticated remote memory...
Keywords:
Status: NEW
Alias: CVE-2026-76235
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2519502
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-08-19 11:46 UTC by OSIDB Bzimport
Modified: 2026-08-20 12:27 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-08-19 11:46:27 UTC
A flaw was found in cockpit-ws. The send_login_html() function in src/ws/cockpithandlers.c reads the CockpitLang cookie via cockpit_web_server_parse_cookie(), which returns a heap-allocated string (via g_uri_unescape_segment, transfer-full ownership). On this code path, the function's only cleanup call is g_strfreev(languages), but languages remains NULL when the value came from the cookie rather than the Accept-Language header, so the allocated 'language' string is never freed. Every unauthenticated GET request to the login page carrying a CockpitLang cookie leaks one heap allocation sized by the (attacker-controlled) decoded cookie value, up to Cockpit's ~8192-byte request-size cap. Sustained requests grow the shared cockpit-ws process's memory without bound, eventually causing it to be OOM-killed and disrupting all users of that instance, not just the attacker.

Candidate upstream fix (Martin Vollmer):
  if (languages)
    g_strfreev (languages);
  else
    g_free (language);

Comment 2 Marius Vollmer 2026-08-20 12:27:45 UTC
Proposed fix: https://github.com/cockpit-project/cockpit/pull/23633


Note You need to log in before you can comment on or make changes to this bug.