Skip to content

GHSA-8wj3-cpmr-8whp CVE-2022-2818

Cockpit Content Platform vulnerable to 2FA bypass

High Packagist
Severity
8.8 / 10
High · CVSS 3.1
Exploit chance (EPSS)
1.69%
Chance of exploitation in the next 30 days. Higher than 77.13% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-212 Improper Removal of Sensitive Information Before Storage or Transfer
CWE-287 Improper Authentication
CWE-305 Authentication Bypass by Primary Weakness
Fix
2.2.2
Upgrade cockpit-hq/cockpit to this version or later

Description

Cockpit Content Platform through version 2.2.1 is vulnerable to a two-factor authentication (2FA) bypass. The 2FA secret is disclosed in a JWT token after user logs into their account, allowing an attacker to bypass the 2FA code. A patch is available on the develop branch and is expected to be part of version 2.2.2.

Affected versions

Packagist

PackageVulnerableFixed in
cockpit-hq/cockpit
< 2.2.2
2.2.2

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

cockpit-hq/cockpit Packagist → 2.2.2

composer
composer require cockpit-hq/cockpit:^2.2.2

Severity breakdown

CVSS 3.1 8.8

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer

The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors.

How to prevent it
  • Requirements: Clearly specify which information should be regarded as private or sensitive, and require that the product offers functionality that allows the user to cleanse the sensitive information from the resource before it is published or exported to other parties.
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
  • Implementation, Operation: Some tools can automatically analyze documents to redact, strip, or "sanitize" private information, although some human review might be necessary. Tools may vary in terms of which document formats can be processed. When calling an external program to automatically generate or convert documents, invoke the program with any available options that avoid generating sensitive metadata. Some formats have well-defined fields that could contain private data, such as Exchangeable image file format (Exif), which can contain potentially sensitive metadata such as geolocation, date, and time [REF-1515] [REF-1516].
  • Implementation: Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.
  • Implementation: Avoid errors related to improper resource shutdown or release (CWE-404), which may leave the sensitive data within the resource if it is in an incomplete state.

CWE-287: Improper Authentication

When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

How to prevent it
  • Architecture and Design: Use an authentication framework or library such as the OWASP ESAPI Authentication feature.

CWE-305: Authentication Bypass by Primary Weakness

The authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-ch4j-vcf5-58x5
Cockpit CMS: Stored cross-site scripting vulnerability in the Set field type's Display template option
Medium Also affects cockpit-hq/cockpit
GHSA-p46p-7pmj-m34f
Cockpit is vulnerable to directory traversal
Medium Also affects cockpit-hq/cockpit
GHSA-j2rx-4jg9-79mw
Cockpit Vulnerable to Unrestricted Upload of File with Dangerous Type
High Also affects cockpit-hq/cockpit
GHSA-fm6c-rhcf-7439
Cockpit is vulnerable to arbitrary code execution
Critical Also affects cockpit-hq/cockpit
GHSA-5pv2-86qj-5jf9
Cockpit has NoSQL Injection Through Content Aggregation Pipelines
Medium Also affects cockpit-hq/cockpit
GHSA-7x5c-vfhj-9628
Cockpit CMS has SQL Injection in MongoLite Aggregation Optimizer via toJsonExtractRaw()
Medium Also affects cockpit-hq/cockpit
GHSA-j4rj-fgcq-wmqp
Cockpit - Content Platform vulnerable to XSS through name or email argument names
Medium Also affects cockpit-hq/cockpit
GHSA-wp68-xrfg-xvq4
Cockpit Arbitrary File Upload
High Also affects cockpit-hq/cockpit
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor