CVE-2023-4196: Cockpit hq/cockpit Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-w3qm-93vf-5hrw
CVSS 8.3
CWE-79
Published
Advisory Summary

CVE-2023-4196 is a HIGH (CVSS 8.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Cockpit hq/cockpit libraries in the Packagist ecosystem. The issue involves cockpit cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 2.6.3.

CVE-2023-4196 at a Glance

CVE Identifier CVE-2023-4196
GHSA Identifier GHSA-w3qm-93vf-5hrw
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Cockpit hq/cockpit
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2023-4196

To remediate this vulnerability, upgrade all affected Cockpit hq/cockpit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

cockpit-hq/cockpit fixed: 2.6.3
Upgrade cockpit-hq/cockpit to 2.6.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for cockpit-hq/cockpit

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-4196, inspect your project dependencies for Cockpit hq/cockpit:

inspect dependencies for cockpit-hq/cockpit

Analyze the terminal output to locate any version of Cockpit hq/cockpit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Cockpit hq/cockpit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Cross-site Scripting (XSS) - Stored in GitHub repository cockpit-hq/cockpit prior to 2.6.3. For any role that has permission to execute function assets, an attacker can upload a html file and that leads to XSS.

CVE-2023-4196 Affected Cockpit hq/cockpit Versions

1 component(s)
Fixed Versions:
2.6.3
Product / Package Ecosystem Affected Versions Fixed Version
cockpit-hq/cockpit
Packagist
< 2.6.3
2.6.3

References

Frequently Asked Questions

What is CVE-2023-4196?
CVE-2023-4196 is a security vulnerability in Cockpit hq/cockpit involving Cockpit Cross-site Scripting vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Cockpit hq/cockpit versions are affected?
Affected versions include releases prior to 2.6.3 across affected packages: cockpit-hq/cockpit.
What version fixes CVE-2023-4196?
Upgrading to 2.6.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cockpit-hq/cockpit affected?
Yes, cockpit-hq/cockpit is affected in releases prior to 2.6.3. Upgrade your dependency to 2.6.3 or later.
What is the CVSS score of CVE-2023-4196?
CVE-2023-4196 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2023-4196?
CVE-2023-4196 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2023-4196?
Run the dependency tree command: 'inspect dependencies for cockpit-hq/cockpit'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w3qm-93vf-5hrw",
  "modified" : "2023-08-09T14:33:39Z",
  "published" : "2023-08-06T18:30:25Z",
  "aliases" : [ "CVE-2023-4196" ],
  "summary" : "Cockpit Cross-site Scripting vulnerability",
  "details" : "Cross-site Scripting (XSS) - Stored in GitHub repository cockpit-hq/cockpit prior to 2.6.3. For any role that has permission to execute function assets, an attacker can upload a html file and that leads to XSS.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cockpit-hq/cockpit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-4196"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cockpit-hq/cockpit/commit/039a00cc310bff128ca6e6c1c46c6fbad0385c2c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cockpit-hq/cockpit"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.dev/bounties/c275a2d4-721f-49f7-8787-b146af2056a0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-09T14:33:39Z",
    "nvd_published_at" : "2023-08-06T18:15:10Z"
  }
}