{
  "document": {
    "aggregate_severity": {
      "namespace": "https://access.redhat.com/security/updates/classification/",
      "text": "Important"
    },
    "category": "csaf_vex",
    "csaf_version": "2.0",
    "distribution": {
      "text": "Copyright © Red Hat, Inc. All rights reserved.",
      "tlp": {
        "label": "WHITE",
        "url": "https://www.first.org/tlp/"
      }
    },
    "lang": "en",
    "notes": [
      {
        "category": "legal_disclaimer",
        "text": "This content is licensed under the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/). If you distribute this content, or a modified version of it, you must provide attribution to Red Hat Inc. and provide a link to the original.",
        "title": "Terms of Use"
      }
    ],
    "publisher": {
      "category": "vendor",
      "contact_details": "https://access.redhat.com/security/team/contact/",
      "issuing_authority": "Red Hat Product Security is responsible for vulnerability handling across all Red Hat products and services.",
      "name": "Red Hat Product Security",
      "namespace": "https://www.redhat.com"
    },
    "references": [
      {
        "category": "self",
        "summary": "Canonical URL",
        "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40261.json"
      }
    ],
    "title": "composer: command injection via malicious Perforce source reference/url",
    "tracking": {
      "current_release_date": "2026-06-30T03:54:41+00:00",
      "generator": {
        "date": "2026-06-30T03:54:41+00:00",
        "engine": {
          "name": "Red Hat SDEngine",
          "version": "5.3.0"
        }
      },
      "id": "CVE-2026-40261",
      "initial_release_date": "2026-04-15T20:56:32.182000+00:00",
      "revision_history": [
        {
          "date": "2026-04-15T20:56:32.182000+00:00",
          "number": "1",
          "summary": "Initial version"
        },
        {
          "date": "2026-04-29T12:49:39+00:00",
          "number": "2",
          "summary": "Current version"
        },
        {
          "date": "2026-06-30T03:54:41+00:00",
          "number": "3",
          "summary": "Last generated version"
        }
      ],
      "status": "final",
      "version": "3"
    }
  },
  "product_tree": {
    "branches": [
      {
        "branches": [
          {
            "branches": [
              {
                "category": "product_name",
                "name": "Red Hat Hardened Images",
                "product": {
                  "name": "Red Hat Hardened Images",
                  "product_id": "Red Hat Hardened Images",
                  "product_identification_helper": {
                    "cpe": "cpe:/a:redhat:hummingbird:1"
                  }
                }
              }
            ],
            "category": "product_family",
            "name": "Red Hat Hardened Images"
          },
          {
            "branches": [
              {
                "category": "product_version",
                "name": "composer-main@noarch",
                "product": {
                  "name": "composer-main@noarch",
                  "product_id": "composer-main@noarch",
                  "product_identification_helper": {
                    "purl": "pkg:rpm/redhat/composer@2.9.7-1.hum1?arch=noarch&distro=hummingbird-20251124&repository_id=public-hummingbird-x86_64-rpms"
                  }
                }
              }
            ],
            "category": "architecture",
            "name": "noarch"
          },
          {
            "branches": [
              {
                "category": "product_version",
                "name": "composer-main@src",
                "product": {
                  "name": "composer-main@src",
                  "product_id": "composer-main@src",
                  "product_identification_helper": {
                    "purl": "pkg:rpm/redhat/composer@2.9.7-1.hum1?arch=src&distro=hummingbird-20251124&repository_id=public-hummingbird-source-rpms"
                  }
                }
              }
            ],
            "category": "architecture",
            "name": "src"
          }
        ],
        "category": "vendor",
        "name": "Red Hat"
      }
    ],
    "relationships": [
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "composer-main@noarch as a component of Red Hat Hardened Images",
          "product_id": "Red Hat Hardened Images:composer-main@noarch"
        },
        "product_reference": "composer-main@noarch",
        "relates_to_product_reference": "Red Hat Hardened Images"
      },
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "composer-main@src as a component of Red Hat Hardened Images",
          "product_id": "Red Hat Hardened Images:composer-main@src"
        },
        "product_reference": "composer-main@src",
        "relates_to_product_reference": "Red Hat Hardened Images"
      }
    ]
  },
  "vulnerabilities": [
    {
      "cve": "CVE-2026-40261",
      "cwe": {
        "id": "CWE-78",
        "name": "Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')"
      },
      "discovery_date": "2026-04-15T22:00:54.256960+00:00",
      "ids": [
        {
          "system_name": "Red Hat Bugzilla ID",
          "text": "2458841"
        }
      ],
      "notes": [
        {
          "category": "description",
          "text": "A flaw was found in Composer. `Perforce::syncCodeBase()` appends the `$sourceReference` parameter to a shell command without proper escaping, allowing an attacker to inject arbitrary commands through a crafted source reference containing shell metacharacters.",
          "title": "Vulnerability description"
        },
        {
          "category": "summary",
          "text": "composer: command injection via malicious Perforce source reference/url",
          "title": "Vulnerability summary"
        },
        {
          "category": "other",
          "text": "This issue can be exploited via any package served by a compromised or malicious Composer repository when installing or updating dependencies from source, including the default behavior when installing dev-prefixed versions. Exploitation results in arbitrary command execution. Due to these reasons, this flaw has been rated with an important severity.",
          "title": "Statement"
        },
        {
          "category": "general",
          "text": "The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.",
          "title": "CVSS score applicability"
        }
      ],
      "product_status": {
        "fixed": [
          "Red Hat Hardened Images:composer-main@noarch",
          "Red Hat Hardened Images:composer-main@src"
        ]
      },
      "references": [
        {
          "category": "self",
          "summary": "Canonical URL",
          "url": "https://access.redhat.com/security/cve/CVE-2026-40261"
        },
        {
          "category": "external",
          "summary": "RHBZ#2458841",
          "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2458841"
        },
        {
          "category": "external",
          "summary": "https://www.cve.org/CVERecord?id=CVE-2026-40261",
          "url": "https://www.cve.org/CVERecord?id=CVE-2026-40261"
        },
        {
          "category": "external",
          "summary": "https://nvd.nist.gov/vuln/detail/CVE-2026-40261",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40261"
        },
        {
          "category": "external",
          "summary": "https://github.com/composer/composer/releases/tag/2.9.6",
          "url": "https://github.com/composer/composer/releases/tag/2.9.6"
        },
        {
          "category": "external",
          "summary": "https://github.com/composer/composer/security/advisories/GHSA-gqw4-4w2p-838q",
          "url": "https://github.com/composer/composer/security/advisories/GHSA-gqw4-4w2p-838q"
        }
      ],
      "release_date": "2026-04-15T20:56:32.182000+00:00",
      "remediations": [
        {
          "category": "vendor_fix",
          "date": "2026-04-14T17:59:27+00:00",
          "details": "For details on how to apply this update, which includes the changes described in this advisory, refer to:\nhttps://images.redhat.com/",
          "product_ids": [
            "Red Hat Hardened Images:composer-main@noarch",
            "Red Hat Hardened Images:composer-main@src"
          ],
          "url": "https://access.redhat.com/errata/RHSA-2026:8165"
        },
        {
          "category": "workaround",
          "details": "To mitigate this issue, only run Composer commands on projects and dependencies from trusted sources. Also, use the '--prefer-dist' or the 'preferred-install: dist' configuration setting to prevent Composer from installing dependencies from source.",
          "product_ids": [
            "Red Hat Hardened Images:composer-main@noarch",
            "Red Hat Hardened Images:composer-main@src"
          ]
        }
      ],
      "scores": [
        {
          "cvss_v3": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 8.8,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "products": [
            "Red Hat Hardened Images:composer-main@noarch",
            "Red Hat Hardened Images:composer-main@src"
          ]
        }
      ],
      "threats": [
        {
          "category": "impact",
          "details": "Important",
          "product_ids": [
            "Red Hat Hardened Images:composer-main@noarch",
            "Red Hat Hardened Images:composer-main@src"
          ]
        }
      ],
      "title": "composer: command injection via malicious Perforce source reference/url"
    }
  ]
}