From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "magic" |
|---|
| subject | "Format:WebP" |
|---|
| claim | "A WebP file begins with RIFF, a little-endian u32 (file size - 8) and WEBP; the first chunk FourCC at offset 12 is 'VP8 ' (lossy), 'VP8L' (lossless) or 'VP8X' (extended). libwebp's decoder only validates the RIFF container 'if detected': data that does not start with RIFF is passed on as a bare VP8/VP8L bitstream, so the decoder also accepts raw bitstreams (a bare VP8L stream starts with signature byte 0x2F, a VP8 key frame has 9D 01 2A at bytes 3-5). RIFF followed by anything but WEBP is rejected." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:WebP" |
|---|
| observed_in | |
|---|
|
|---|
| data | | bytes | "52 49 46 46 ?? ?? ?? ?? 57 45 42 50" |
|---|
| offset | 0 |
|---|
| meaning | "RIFF container, form type WEBP; 12-byte header" |
|---|
| mask | "FF FF FF FF 00 00 00 00 FF FF FF FF" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Comment block 'RIFF layout' (RIFF, size, WEBP, then VP8 /VP8L/VP8X chunk at 12) and ParseRIFF: if the data starts with RIFF and bytes 8-11 are not WEBP returns VP8_STATUS_BITSTREAM_ERROR; with no RIFF tag riff_size stays 0 and parsing continues on the raw data" |
|---|
| repo | "https://github.com/webmproject/libwebp" |
|---|
| commit | "0464ce36981fc8169f69923eb6957dd46848967a" |
|---|
| path | "src/dec/webp_dec.c" |
|---|
| lines | "33-100" |
|---|
|
| type | "source" |
|---|
| detail | "VP8_SIGNATURE 0x9d012a and VP8L_MAGIC_BYTE 0x2f" |
|---|
| repo | "https://github.com/webmproject/libwebp" |
|---|
| commit | "0464ce36981fc8169f69923eb6957dd46848967a" |
|---|
| path | "src/webp/format_constants.h" |
|---|
| lines | "21, 28" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "RIFF WEBP header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T14:56:41.802Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T12:42:12.922Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read webp_dec.c 33-100 (RIFF layout comment, ParseRIFF: RIFF then non-WEBP at 8 is a bitstream error, no RIFF leaves riff_size 0 and parsing continues on raw data) and format_constants.h 21, 28 (VP8_SIGNATURE 0x9d012a, VP8L_MAGIC_BYTE 0x2f) at 0464ce3. Mask matches the 12-byte header." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T09:12:21.434Z" |
|---|
| summary | "Evidence file did not contain the RIFF layout; cite webp_dec.c; bare VP8/VP8L streams are also accepted" |
|---|
| changed | | "claim" |
| "evidence replaced" |
|
|---|
|
|
|---|