GCVE-1-2026-0008

Vulnerability from gna-1 – Published: 2026-01-28 13:48 – Updated: 2026-01-28 13:48
VLAI?
Title
gpg-agent stack buffer overflow in pkdecrypt using KEM
Summary
A crafted CMS (S/MIME) EnvelopedData message carrying an oversized wrapped session key (AES Key Wrap ciphertext) can cause a stack buffer overflow in gpg-agent during PKDECRYPT --kem=CMS handling. The root cause is an unbounded session key length derived from attacker-controlled ciphertext and used as the AES Key Wrap output length when decrypting into a fixed-size stack buffer. libgcrypt’s AES-KW unwrap copies attacker-controlled bytes into the caller-provided output buffer before performing integrity checks, so the stack overflow occurs even if later CMS or key-wrap integrity validation fails.
CWE
  • CWE-120 - Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
Assigner
References
Impacted products
Vendor Product Version
gnupg gpg-agent Affected: 2.5.13 , < 2.5.17
Create a notification for this product.
Credits
OpenAI Security Research Werner Koch

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "gpg-agent",
          "vendor": "gnupg",
          "versions": [
            {
              "lessThan": "2.5.17",
              "status": "affected",
              "version": "2.5.13"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "OpenAI Security Research"
        },
        {
          "lang": "en",
          "type": "remediation developer",
          "value": "Werner Koch"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "A crafted CMS (S/MIME) EnvelopedData message carrying an oversized wrapped\u003cbr\u003e\nsession key (AES Key Wrap ciphertext) can cause a stack buffer overflow in\u003cbr\u003e\ngpg-agent during PKDECRYPT --kem=CMS handling. The root cause is an\u003cbr\u003e\nunbounded session key length derived from attacker-controlled ciphertext\u003cbr\u003e\nand used as the AES Key Wrap output length when decrypting into a\u003cbr\u003e\nfixed-size stack buffer. libgcrypt\u2019s AES-KW unwrap copies\u003cbr\u003e\nattacker-controlled bytes into the caller-provided output buffer before\u003cbr\u003e\nperforming integrity checks, so the stack overflow occurs even if later CMS\u003cbr\u003e\nor key-wrap integrity validation fails.\u003cbr\u003e"
            }
          ],
          "value": "A crafted CMS (S/MIME) EnvelopedData message carrying an oversized wrapped\n\nsession key (AES Key Wrap ciphertext) can cause a stack buffer overflow in\n\ngpg-agent during PKDECRYPT --kem=CMS handling. The root cause is an\n\nunbounded session key length derived from attacker-controlled ciphertext\n\nand used as the AES Key Wrap output length when decrypting into a\n\nfixed-size stack buffer. libgcrypt\u2019s AES-KW unwrap copies\n\nattacker-controlled bytes into the caller-provided output buffer before\n\nperforming integrity checks, so the stack overflow occurs even if later CMS\n\nor key-wrap integrity validation fails."
        }
      ],
      "impacts": [
        {
          "descriptions": [
            {
              "lang": "en"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "Automatable": "NOT_DEFINED",
            "Recovery": "NOT_DEFINED",
            "Safety": "NOT_DEFINED",
            "attackComplexity": "LOW",
            "attackRequirements": "NONE",
            "attackVector": "NETWORK",
            "baseScore": 10,
            "baseSeverity": "CRITICAL",
            "privilegesRequired": "NONE",
            "providerUrgency": "NOT_DEFINED",
            "subAvailabilityImpact": "HIGH",
            "subConfidentialityImpact": "HIGH",
            "subIntegrityImpact": "HIGH",
            "userInteraction": "NONE",
            "valueDensity": "NOT_DEFINED",
            "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H",
            "version": "4.0",
            "vulnAvailabilityImpact": "HIGH",
            "vulnConfidentialityImpact": "HIGH",
            "vulnIntegrityImpact": "HIGH",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-120",
              "description": "CWE-120 Buffer Copy without Checking Size of Input (\u0027Classic Buffer Overflow\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "orgId": "00000000-0000-4000-9000-000000000000"
      },
      "references": [
        {
          "tags": [
            "issue-tracking"
          ],
          "url": "https://dev.gnupg.org/T8044"
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "gpg-agent stack buffer overflow in pkdecrypt using KEM",
      "x_generator": {
        "engine": "Vulnogram 0.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "00000000-0000-4000-9000-000000000000",
    "datePublished": "2026-01-28T13:48:12.350509Z",
    "dateUpdated": "2026-01-28T13:48:12.350509Z",
    "requesterUserId": "00000000-0000-4000-9000-000000000000",
    "serial": 1,
    "state": "PUBLISHED",
    "vulnId": "gcve-1-2026-0008",
    "vulnerabilitylookup_history": [
      [
        "alexandre.dulaunoy@circl.lu",
        "2026-01-28T13:48:12.350509Z"
      ]
    ]
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…