Skip to content
Heist/ feed
Back to feed
Medium

libjpeg — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2022-31620

In libjpeg before 1.64, BitStream::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.

Products
libjpeg
Affected versions
0.0~git20190821.87636f3b26b4-1, 0.0~git20190821.87636f3b26b4-1.1, 0.0~git20210129.91985dc-1build1, 0.0~git20210908.58455ca-1, 0.0~git20211115.76133b7-1, 0.0~git20211203.966a8ed-1, 0.0~git20220805.54ec643-1, 0.0~git20241105.c719010-1, 0.0~git20250815.25f7128-1, 0.0~git20250815.25f7128-2, 0.0~git20250815.25f7128-3
Fixed versions
Not specified
CVEs
CVE-2022-31620
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 00:55 UTC · Revision 1

Source evidence

UBUNTU-CVE-2022-31620

core-osv · Original source

Published 25 May 2022, 21:15 UTC

In libjpeg before 1.64, BitStream::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.

osv:UBUNTU-CVE-2022-31620

libjpeg

Fixed versions: Not specified

libjpeg

Fixed versions: Not specified

libjpeg

Fixed versions: Not specified

libjpeg

Fixed versions: Not specified

libjpeg

Fixed versions: Not specified

libjpeg

Fixed versions: Not specified

Complete source record
{
  "id": "94d73b9b08dde56377637078659e644c775b11173f59ba8d8696aa5da58dc5c2",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2022-31620",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2022-31620",
    "summary": "In libjpeg before 1.64, BitStream::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.",
    "evidence": "osv:UBUNTU-CVE-2022-31620",
    "products": [
      {
        "name": {
          "value": "libjpeg",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20190821.87636f3b26b4-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.0~git20190821.87636f3b26b4-1.1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libjpeg",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20210129.91985dc-1build1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.0~git20210908.58455ca-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.0~git20211115.76133b7-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.0~git20211203.966a8ed-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libjpeg",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20220805.54ec643-1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libjpeg",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20241105.c719010-1",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libjpeg",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20250815.25f7128-2",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "0.0~git20250815.25f7128-3",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libjpeg",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20241105.c719010-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "0.0~git20250815.25f7128-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "0.0~git20250815.25f7128-2",
            "evidence": "/affected/5/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "UBUNTU-CVE-2022-31620",
      "aliases": [
        "UBUNTU-CVE-2022-31620"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "low"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libjpeg",
            "purl": "pkg:deb/ubuntu/libjpeg?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "0.0~git20190821.87636f3b26b4-1",
            "0.0~git20190821.87636f3b26b4-1.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31620.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libjpeg-tools",
                "binary_version": "0.0~git20190821.87636f3b26b4-1.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libjpeg",
            "purl": "pkg:deb/ubuntu/libjpeg?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "0.0~git20210129.91985dc-1build1",
            "0.0~git20210908.58455ca-1",
            "0.0~git20211115.76133b7-1",
            "0.0~git20211203.966a8ed-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31620.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libjpeg-tools",
                "binary_version": "0.0~git20211203.966a8ed-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libjpeg",
            "purl": "pkg:deb/ubuntu/libjpeg?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "0.0~git20220805.54ec643-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31620.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libjpeg-tools",
                "binary_version": "0.0~git20220805.54ec643-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libjpeg",
            "purl": "pkg:deb/ubuntu/libjpeg?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "0.0~git20241105.c719010-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31620.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libjpeg-tools",
                "binary_version": "0.0~git20241105.c719010-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libjpeg",
            "purl": "pkg:deb/ubuntu/libjpeg?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "0.0~git20250815.25f7128-2",
            "0.0~git20250815.25f7128-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31620.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libjpeg-tools",
                "binary_version": "0.0~git20250815.25f7128-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libjpeg",
            "purl": "pkg:deb/ubuntu/libjpeg?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "0.0~git20241105.c719010-1",
            "0.0~git20250815.25f7128-1",
            "0.0~git20250815.25f7128-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31620.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libjpeg-tools",
                "binary_version": "0.0~git20250815.25f7128-2"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:17.048278125Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-31620"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2022-31620",
        "https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a",
        "https://github.com/thorfdbg/libjpeg/issues/70",
        "https://www.cve.org/CVERecord?id=CVE-2022-31620"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-31620",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 355126,
  "published_at": "2022-05-25T21:15:00+00:00"
}