Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-36978

QPDF 9.x through 9.1.1 and 10.x through 10.0.4 has a heap-based buffer overflow in Pl_ASCII85Decoder::write (called from Pl_AES_PDF::flush and Pl_AES_PDF::finish) when a certain downstream write fails.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-36978
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:45 UTC · Revision 1

Source evidence

CVE-2021-36978

core-osv · Original source

Published 20 Jul 2021, 07:15 UTC

QPDF 9.x through 9.1.1 and 10.x through 10.0.4 has a heap-based buffer overflow in Pl_ASCII85Decoder::write (called from Pl_AES_PDF::flush and Pl_AES_PDF::finish) when a certain downstream write fails.

osv:CVE-2021-36978
Complete source record
{
  "id": "0f833e0b262d4abd17d33b4c5dc034aaa909b8c5724f151ca1ae079e3d2aea9e",
  "url": "https://osv.dev/vulnerability/CVE-2021-36978",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-36978",
    "summary": "QPDF 9.x through 9.1.1 and 10.x through 10.0.4 has a heap-based buffer overflow in Pl_ASCII85Decoder::write (called from Pl_AES_PDF::flush and Pl_AES_PDF::finish) when a certain downstream write fails.",
    "evidence": "osv:CVE-2021-36978",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-36978",
      "aliases": [
        "CVE-2021-36978"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/qpdf/qpdf",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5462dfce3106ffcc9b866902773933adeb7a4d41"
                },
                {
                  "last_affected": "52a2e95dd5ab2c2a197aa0a564a4e09c551e8309"
                },
                {
                  "introduced": "892937cbbeeef612da9e8b8a4b5ba145fc1e6caa"
                },
                {
                  "last_affected": "78b9d6bfd4cbd3e947b1c5ffe73eb97b040e312a"
                },
                {
                  "fixed": "dc92574c10f3e2516ec6445b88c5d584f40df4e5"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:qpdf_project:qpdf:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "9.0.0"
                      },
                      {
                        "last_affected": "9.1.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:qpdf_project:qpdf:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "10.0.0"
                      },
                      {
                        "last_affected": "10.0.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "dc92574c10f3e2516ec6445b88c5d584f40df4e5"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "release-qpdf-10.0.4",
            "release-qpdf-10.0.3",
            "release-qpdf-10.0.2",
            "release-qpdf-10.0.1",
            "release-qpdf-10.0.0",
            "release-qpdf-9.1.1",
            "release-qpdf-9.1.0",
            "release-qpdf-9.1.rc1",
            "release-qpdf-9.0.2",
            "release-qpdf-9.0.1",
            "release-qpdf-9.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-36978.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-36978-346f02bf",
                "digest": {
                  "length": 601,
                  "function_hash": "144956906454211698411691442384169583080"
                },
                "source": "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5",
                "target": {
                  "file": "libqpdf/Pl_ASCII85Decoder.cc",
                  "function": "Pl_ASCII85Decoder::flush"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-36978-40dda416",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "13694993585028465781001319959825347373",
                    "310087498959386361797291823932404456576",
                    "49649446920326451269899972948266568550",
                    "13342412487834560302921158546766133040",
                    "35639778790983792980946705142459620813",
                    "40699785523547269874326470352434338009",
                    "120104397444494129316167492941951621002",
                    "33774880105769830406438680590666744443"
                  ]
                },
                "source": "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5",
                "target": {
                  "file": "libqpdf/Pl_ASCIIHexDecoder.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-36978-63f64580",
                "digest": {
                  "length": 227,
                  "function_hash": "187767804974098575998698531302435435782"
                },
                "source": "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5",
                "target": {
                  "file": "libqpdf/Pl_Count.cc",
                  "function": "Pl_Count::write"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-36978-9c33a036",
                "digest": {
                  "length": 1266,
                  "function_hash": "9705939944941504444367821742668190477"
                },
                "source": "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5",
                "target": {
                  "file": "libqpdf/Pl_AES_PDF.cc",
                  "function": "Pl_AES_PDF::flush"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-36978-b6d83928",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "321687402356745505709807097041181169873",
                    "195795008906658110627770024484001465071",
                    "243075336715669782149423546345526685975",
                    "73538397886346705444978026317791772716",
                    "240297237944962101967649497148396010055",
                    "327952393685159224342343458199478375702"
                  ]
                },
                "source": "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5",
                "target": {
                  "file": "libqpdf/Pl_ASCII85Decoder.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-36978-c34a9232",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "259576175114283761549609434847224880008",
                    "8363428569006197602946321268027361157",
                    "213213413482566284995313261346255273241",
                    "39686366821373870085308297589176283198",
                    "16063276423364534148040834083823740815"
                  ]
                },
                "source": "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5",
                "target": {
                  "file": "libqpdf/Pl_Count.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-36978-e3ce2fb2",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "297677908884695691230243607557058068057",
                    "87327623640626139513340691484857922771",
                    "168551980213957308120344626598273265683"
                  ]
                },
                "source": "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5",
                "target": {
                  "file": "libqpdf/Pl_AES_PDF.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-36978-e8733a89",
                "digest": {
                  "length": 666,
                  "function_hash": "154758842905624294376623863600796136195"
                },
                "source": "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5",
                "target": {
                  "file": "libqpdf/Pl_ASCIIHexDecoder.cc",
                  "function": "Pl_ASCIIHexDecoder::flush"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:27:06Z"
          }
        }
      ],
      "modified": "2026-10-20T14:27:06.501448072Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2023/08/msg00037.html",
        "https://github.com/google/oss-fuzz-vulns/blob/main/vulns/qpdf/OSV-2020-2245.yaml",
        "https://security.gentoo.org/glsa/202401-20",
        "https://github.com/qpdf/qpdf/issues/492",
        "https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28262",
        "https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-36978",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388996,
  "published_at": "2021-07-20T07:15:08.03+00:00"
}