Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-38171

adts_decode_extradata in libavformat/adtsenc.c in FFmpeg 4.4 does not check the init_get_bits return value, which is a necessary step because the second argument to init_get_bits can be crafted.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-38171
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 09:29 UTC · Revision 1

Source evidence

CVE-2021-38171

core-osv · Original source

Published 21 Aug 2021, 17:15 UTC

adts_decode_extradata in libavformat/adtsenc.c in FFmpeg 4.4 does not check the init_get_bits return value, which is a necessary step because the second argument to init_get_bits can be crafted.

osv:CVE-2021-38171
Complete source record
{
  "id": "504d7c63221c03a4de7d7c174a7911c23100f5c1a70826606586ebdc8cd637e2",
  "url": "https://osv.dev/vulnerability/CVE-2021-38171",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-38171",
    "summary": "adts_decode_extradata in libavformat/adtsenc.c in FFmpeg 4.4 does not check the init_get_bits return value, which is a necessary step because the second argument to init_get_bits can be crafted.",
    "evidence": "osv:CVE-2021-38171",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2021-38171",
      "aliases": [
        "CVE-2021-38171"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.ffmpeg.org/ffmpeg.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c5079bf3bccd24bf8ed45ff47ff4071fd09e9fd8"
                },
                {
                  "last_affected": "c5079bf3bccd24bf8ed45ff47ff4071fd09e9fd8"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ffmpeg:ffmpeg:4.4:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.4"
                      },
                      {
                        "last_affected": "4.4"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "4.4",
            "n4.4-dev"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-38171.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/ffmpeg/ffmpeg",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c5079bf3bccd24bf8ed45ff47ff4071fd09e9fd8"
                },
                {
                  "last_affected": "c5079bf3bccd24bf8ed45ff47ff4071fd09e9fd8"
                },
                {
                  "fixed": "9ffa49496d1aae4cbbb387aac28a9e061a6ab0a6"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ffmpeg:ffmpeg:4.4:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.4"
                      },
                      {
                        "last_affected": "4.4"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "9ffa49496d1aae4cbbb387aac28a9e061a6ab0a6"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "4.4",
            "n4.4-dev"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-38171.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-38171-e3cbe9ce",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "340113475355395989559555410026913520501",
                    "137990287974201680121919945555266282413",
                    "104727278381930846197606427839919055206",
                    "306440550592068726656414586700004213449",
                    "111695304590519358973522263762808409562"
                  ]
                },
                "source": "https://github.com/ffmpeg/ffmpeg/commit/9ffa49496d1aae4cbbb387aac28a9e061a6ab0a6",
                "target": {
                  "file": "libavformat/adtsenc.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-38171-e6f862de",
                "digest": {
                  "length": 1445,
                  "function_hash": "220551853458764014735923732241586144836"
                },
                "source": "https://github.com/ffmpeg/ffmpeg/commit/9ffa49496d1aae4cbbb387aac28a9e061a6ab0a6",
                "target": {
                  "file": "libavformat/adtsenc.c",
                  "function": "adts_decode_extradata"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-24T14:51:09Z"
          }
        }
      ],
      "modified": "2026-10-24T14:51:09.136669379Z",
      "provider": "osv",
      "references": [
        "https://patchwork.ffmpeg.org/project/ffmpeg/patch/AS8P193MB12542A86E22F8207EC971930B6F19%40AS8P193MB1254.EURP193.PROD.OUTLOOK.COM/",
        "https://lists.debian.org/debian-lts-announce/2021/11/msg00012.html",
        "https://security.gentoo.org/glsa/202312-14",
        "https://www.debian.org/security/2021/dsa-4990",
        "https://www.debian.org/security/2021/dsa-4998",
        "https://github.com/FFmpeg/FFmpeg/commit/9ffa49496d1aae4cbbb387aac28a9e061a6ab0a6"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "9.0"
                  },
                  {
                    "last_affected": "9.0"
                  },
                  {
                    "introduced": "10.0"
                  },
                  {
                    "last_affected": "10.0"
                  },
                  {
                    "introduced": "11.0"
                  },
                  {
                    "last_affected": "11.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-38171",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 443871,
  "published_at": "2021-08-21T17:15:07.7+00:00"
}