Intel

AIKIDO-2026-595238

rarfile is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-v5rw-pq35-5xw4 Published Yesterday

75

High Risk

This Affects:

PYTHONrarfile
0.0.1 - 4.3.0
Fixed in 4.4.0
Are you affected? Scan for Free

TL;DR

The RAR3 archive parser reads an archive-controlled 32-bit size field for legacy old-style sub-blocks and calls fd.read() with that value before the block header CRC is validated. A crafted archive of under one kilobyte can therefore force the process to allocate a multi-gigabyte bytes object purely while the file is being parsed. Every public entry point that opens an archive, such as RarFile, is_rarfile, extractall, read, and testrar, reaches this path and can exhaust available memory. The fix stops eagerly reading the sub-block payload and bounds the size before any allocation.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application parses RAR archives from untrusted or externally supplied sources.

Background info

rarfile is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 4.3.0.

How to fix this

Upgrade the rarfile library to the patch version.