CVE-2024-33662: Github.com/portainer/portainer Portainer Improperly Uses An Encryption Vulnerability

HIGH
Advisory Identifier: GHSA-9mjw-79r6-c9m8
CVSS 7.5
CWE-327 CWE-326
Published
Advisory Summary

CVE-2024-33662 is a HIGH (CVSS 7.5) portainer improperly uses an encryption vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Github.com/portainer/portainer libraries in the Go ecosystem. The issue involves portainer improperly uses an encryption algorithm in the aesencrypt function. Remediation is available by upgrading affected packages to version 2.20.2.

CVE-2024-33662 at a Glance

CVE Identifier CVE-2024-33662
GHSA Identifier GHSA-9mjw-79r6-c9m8
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Github.com/portainer/portainer
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2024-33662

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

github.com/portainer/portainer fixed: 2.20.2
Upgrade github.com/portainer/portainer to 2.20.2
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 github.com/portainer/portainer

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-33662, inspect your project dependencies for Github.com/portainer/portainer:

inspect dependencies for github.com/portainer/portainer

Analyze the terminal output to locate any version of Github.com/portainer/portainer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.20.2), 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Github.com/portainer/portainer, 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

Portainer before 2.20.2 improperly uses an encryption algorithm in the `AesEncrypt` function.

CVE-2024-33662 Affected Github.com/portainer/portainer Versions

1 component(s)
Fixed Versions:
2.20.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/portainer/portainer
Go
< 2.20.2
2.20.2

References

Frequently Asked Questions

What is CVE-2024-33662?
CVE-2024-33662 is a security vulnerability in Github.com/portainer/portainer involving Portainer improperly uses an encryption algorithm in the AesEncrypt function under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Github.com/portainer/portainer versions are affected?
Affected versions include releases prior to 2.20.2 across affected packages: github.com/portainer/portainer.
What version fixes CVE-2024-33662?
Upgrading to 2.20.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/portainer/portainer affected?
Yes, github.com/portainer/portainer is affected in releases prior to 2.20.2. Upgrade your dependency to 2.20.2 or later.
What is the CVSS score of CVE-2024-33662?
CVE-2024-33662 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-33662?
CVE-2024-33662 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check Go dependencies for CVE-2024-33662?
Run the dependency tree command: 'inspect dependencies for github.com/portainer/portainer'. 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-9mjw-79r6-c9m8",
  "modified" : "2024-12-04T22:18:00Z",
  "published" : "2024-10-02T06:30:26Z",
  "aliases" : [ "CVE-2024-33662" ],
  "summary" : "Portainer improperly uses an encryption algorithm in the AesEncrypt function",
  "details" : "Portainer before 2.20.2 improperly uses an encryption algorithm in the `AesEncrypt` function.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/portainer/portainer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.20.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-33662"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/portainer/portainer/issues/11737"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/portainer/portainer"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/portainer/portainer/compare/2.20.1...2.20.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/search?q=repo%3Aportainer%2Fportainer+EE-6764&type=pullrequests"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3172"
  }, {
    "type" : "WEB",
    "url" : "https://www.portainer.io"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-326", "CWE-327" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-02T17:58:14Z",
    "nvd_published_at" : "2024-10-02T05:15:11Z"
  }
}