Dataset Viewer
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
PoC: Avro Negative Enum Index Bypass (fastavro + Apache Avro)
Summary
Both fastavro and Apache Avro Python libraries fail to validate negative enum indices. The bounds check if index >= len(symbols) misses negative values. In Python, list[-1] returns the last element, so a crafted .avro file can cause enum fields to return wrong symbol values.
Confirmed on fastavro 1.12.1 and avro 1.12.1 — GUEST role becomes ADMIN.
Root Cause
Apache avro io.py:769:
if index_of_symbol >= len(writers_schema.symbols):
# Missing: if index_of_symbol < 0
fastavro _read_py.py:280:
writer_schema["symbols"][decoder.read_enum()] # list[-1] = last element
Demonstrated Bypass
Schema: enum Role { GUEST, USER, ADMIN }
Written: role=GUEST (index 0)
Corrupted: index → -1 (zigzag byte 0x01)
Read: role=ADMIN ← WRONG!
Same bug in union index: io.py:866-870 and _read_py.py:413.
Impact
- Data integrity violation in ML data pipelines
- Attacker-controlled enum symbol selection
- Affects BOTH major Python Avro libraries
Files
poc_cython_overflow.py— combined PoC demonstrating enum bypass (section 2)
Reproduction
pip install fastavro avro
python poc_cython_overflow.py
Look for the "Negative Enum Index Bypass" section in output.
Affected Versions
- fastavro <= 1.12.1
- Apache avro (Python) <= 1.12.1
- Downloads last month
- 16