---
schema_version: '1.0'
id: security-20260812-cef11a
title: 'CVE-2026-59885: pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID
  processing allows denial of service'
url: https://osv.dev/vulnerability/GHSA-8ppf-4f7h-5ppj
url_hash: cef11a104da43f594e456c9fd6e924b52aea8413486988b9e6579d98ba76dfe5
canonical_url: https://osv.dev/vulnerability/GHSA-8ppf-4f7h-5ppj
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-59885
- GHSA-8ppf-4f7h-5ppj
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- pyasn1
- PyPI
lang: en
published_at: '2026-07-21T19:11:03Z'
fetched_at: '2026-08-12T16:00:04.659986Z'
updated_at: '2026-08-22T14:45:12Z'
status: published
content_hash: 0b74fe130148f2e87708f22215409e3e6e939759e95050ae4771c0bcdb8326e0
content_changed_at: '2026-08-22T13:15:21.775010Z'
license_note: full
summary: 'pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing
  allows denial of service'
summary_source: rss
summary_en: 'pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing
  allows denial of service'
summary_omitted_reason: null
redistribution: true
keywords_en:
- allows
- and
- complexity
- CVE
- CVE-2026-59885
- denial
- GHSA-8ppf-4f7h-5ppj
- IDENTIFIER
- library vulnerability
- OBJECT
- ObjectBox
- processing
- pyasn1
- PyPI
- Quadratic
- RELATIVE-OID
- service
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- software security
- Training Complexity
entities_en:
- name: CVE
  type: data
- name: ObjectBox
  type: artifact
- name: PyPI
  type: artifact
- name: Training Complexity
  type: concept
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
- name: Training Complexity
  type: concept
- name: ObjectBox
  type: artifact
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
- name: Hardware-Aware Architecture
  type: concept
  weight: 1.0
- name: LanceDB
  type: artifact
  weight: 1.0
- name: sqlite-vec
  type: artifact
  weight: 1.0
computed_at: '2026-08-22T14:45:09Z'
---

# CVE-2026-59885: pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service

## TL;DR
pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service

## Key Points
- cve / CVE-2026-59885 / GHSA-8ppf-4f7h-5ppj / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H / pyasn1 / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
**Advisory:** GHSA-8ppf-4f7h-5ppj (CVE-2026-59885)

**Details:**
### Impact
The BER/CER/DER decoders process OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs. A small crafted payload (tens of kilobytes) containing an OID with many arcs consumes seconds of CPU per decode() call, allowing denial of service in any application that decodes untrusted ASN.1 data (certificates, LDAP, SNMP, Kerberos, etc.). The corresponding encoders have the same quadratic behavior, reachable when an application re-encodes previously decoded attacker-supplied values.

The arc-size limit introduced for CVE-2026-23490 bounds the byte length of an individual arc but not the number of arcs, so it does not mitigate this issue.

### Affected components
ObjectIdentifierPayloadDecoder and RelativeOIDPayloadDecoder in pyasn1/codec/ber/decoder.py; ObjectIdentifierEncoder and RelativeOIDEncoder in pyasn1/codec/ber/encoder.py. The CER and DER codecs inherit these and are equally affected.

### Patches
Fixed in pyasn1 0.6.4: arc accumulation in both decoders and encoders now runs in linear time.

### Workarounds
Limit the size of untrusted ASN.1 input before decoding.

**References:**
- https://github.com/pyasn1/pyasn1/security/advisories/GHSA-8ppf-4f7h-5ppj
- https://nvd.nist.gov/vuln/detail/CVE-2026-59885
- https://github.com/pyasn1/pyasn1/commit/45bdb19eb7df4b3780fe9c912c63e99bffc39dd9
- https://github.com/pyasn1/pyasn1
- https://github.com/pyasn1/pyasn1/releases/tag/v0.6.4

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-8ppf-4f7h-5ppj_

## Source
元記事: [CVE-2026-59885: pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service](https://osv.dev/vulnerability/GHSA-8ppf-4f7h-5ppj) — published 2026-07-21T19:11:03Z
