From 32ab85e98e6651ab60c494aa6bf4cd6961741d59 Mon Sep 17 00:00:00 2001 From: Stephen Masters Date: Sun, 1 Nov 2026 23:12:44 +0000 Subject: [PATCH 1/7] docs(site): two articles, the threat behind sillybos and the advisory watch "Read the tag before you unroll the scroll" introduces the threat with the October 2026 Pillow flaws, the EPS filename passed to Ghostscript and the FlashPix reader, and makes the case for deciding from a file's first bytes and header before any decoder opens it: the format, the name against the contents, the header read with our own code, and the limits that map onto real advisories (the tall TIFF, PixarLog, a frame that changes mode). "Keeping watch on the decoders" is the strategy around advisories end to end: the Monday fetch from OSV, one issue per advisory, the filters that label and never drop, the seven buckets, the rule that a B finding is a policy field plus a corpus case and never a silent default, the record whose refusal claims must name a test, the security page built from it and rebuilt weekly, proposals and promotion for the backfill, and the fuzzing that keeps the readers honest. Both end with a checked Further reading; both are written as "we". Co-authored-by: Yvette Mankerian Co-Authored-By: Claude Fable 5.1 --- ...026-11-01-keeping-watch-on-the-decoders.md | 261 ++++++++++++++++++ ...ad-the-tag-before-you-unroll-the-scroll.md | 236 ++++++++++++++++ 2 files changed, 497 insertions(+) create mode 100644 site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md create mode 100644 site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md diff --git a/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md b/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md new file mode 100644 index 0000000..7e098f7 --- /dev/null +++ b/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md @@ -0,0 +1,261 @@ +--- +title: "Keeping watch on the decoders" +date: 2026-11-01 +draft: false +slug: "keeping-watch-on-the-decoders" +kicker: "Security" +standfirst: "Six libraries decode every scan we read, and between them they publish a security advisory most weeks. This is how we turn that stream into a weekly issue, a bucket, a test and a published record, with a person in the middle and nothing transcribed by hand" +author: stephen-masters +tags: [security, advisories, sillybos, automation, project-notes] +--- + +A digitisation pipeline rests on a short list of libraries it did not +write: Pillow, libtiff, libpng, libjpeg-turbo, zlib, OpenJPEG, FreeType and +poppler. Between them they publish a security advisory most weeks, and in +a bad month, as October 2026 was, several dozen. Each one arrives as a +paragraph of text and a severity score, and poses the same question to +everyone who runs the library: *does this reach me, and what do I do about +it?* + +The usual tools do not answer it. A dependency scanner tells you that a +version you install has an advisory against it; it cannot tell you +whether the flaw is in a command-line tool you never run, a save path you +never take, or the reader a scanned page goes through every time. For a +long while our answer was to read each advisory when we noticed it, decide +in our heads, and upgrade. The decisions were not written down, so when +the next advisory in the same corner of libtiff arrived, the reading +started again from nothing. + +This article is about what we built instead, in the course of building +[sillybos]({{< relref "/sillybos.md" >}}), the check that runs before any +decoder opens a file. The pieces are small. What matters is the shape: +machines fetch and file, a person decides, and every decision becomes +either a test or a sentence that says why there cannot be one. + +## The stream + +A job runs every Monday morning. It asks OSV, the open-source +vulnerability database, for everything published against a watchlist: +the Pillow package on PyPI, and the libtiff, libpng, libjpeg-turbo, zlib, +poppler, OpenJPEG and FreeType packages as Debian tracks them. Debian is +on the list because it is the one source that follows the C libraries +under Pillow and poppler as carefully as PyPI follows Python. + +The raw stream is noisy in predictable ways, and the job cleans it. Debian +publishes its own bulletins that repeat each CVE with a release note +attached; those are dropped. Pillow's advisories arrive three times, as a +GitHub advisory, a PYSEC entry and a Debian record, and are merged into +one, keyed by the CVE. A CVE that has been reserved but has no text yet is +held as pending and checked again next week. And everything already seen +is dropped: every key in a committed baseline file, and every identifier +named in a hidden marker at the top of an existing issue. + +What survives becomes one GitHub issue per advisory, from a fixed +template, with the label `advisory`. The issues are the record of what has +been seen. The job commits nothing, which keeps its permissions to reading +the repository and writing issues, and spares the main branch a bot commit +a week. + +## The filters label; they never drop + +Three mechanical filters look at each new advisory before a person does, +and add a second label, `likely-not-reached`, when they fire. One looks +for a path under `tools/` or `contrib/`, where libtiff keeps its +command-line programs, which no library call runs. One looks in the +headline alone for the verbs of the write path: *save*, *encode*, *write*, +*append*. One looks for the names of Pillow modules that `Image.open` +never touches: the font renderer, the drawing API, the viewer. + +The rule for these filters is the one rule in the whole system we would +defend hardest: they label, and they never drop. The words filter reads +only the headline because a long write-up of a read-path flaw mentions +"writes" somewhere, and a label that nearly every advisory carries says +nothing. "Out-of-bounds write" is blanked out before the search, because +it describes a memory fault and not the save path. Even so, the filters +are wrong sometimes, in both directions, and the issue body lists what +matched so that the person reading it can overrule the label in a glance. +The point of a filter is to let the reader start with the likely-irrelevant +ones, not to let them skip anything. + +## A person, and seven buckets + +Someone reads each issue. The reading answers one question, *is this +reached by opening a file?*, and files the advisory in a bucket. The +buckets are the vocabulary of the whole system, so here they are. + +| Bucket | Meaning | What follows | +|---|---|---| +| **A** | Already refused by an existing check: a format outside the four, a coding the policy refuses, a size over a limit | Name the check, and close | +| **B** | Preventable from a header field our readers can see: a marker, a tag, a chunk, a count, a dimension | A policy field and a hostile corpus case, then close when it ships | +| **B2** | Preventable only by a coarse policy on a PDF's contents, such as a JBIG2 stream or an embedded font | The same as B, through the PDF path, and the policy is admitted to be coarse | +| **C** | Needs decoding to detect: a flaw in the pixel data, the entropy-coded segment, the font program | Out of reach by design; say so, and close. Updating the decoder is the fix | +| **D** | Reaches `pdfinfo` itself | Check that the check still fails closed, and close | +| **N** | Not reached by opening a file: a command-line tool, a save path, a drawing API | Close | +| **U** | A reserved CVE with no text yet | Stays pending; the job re-checks it weekly | + +The honest buckets are C and N, and they are the majority. Most advisories +against a decoder are in code a scan never runs, or in the decoding +itself, where nothing read from the outside can help. Writing that down +is as valuable as the refusals: the next time a flaw lands in libtiff's +PixarLog codec, the record already says that a scan never needs PixarLog +and the policy refuses it, and nobody re-reads the codec. + +## A B finding becomes a test, never a quiet change + +Bucket B is where the work is, and it has a rule attached. A finding that +could be prevented from a header field becomes a **policy field plus a +hostile corpus case, and never a silent change of a default**. + +That means: a field on the policy object, with a default and a stricter +preset value; a command-line option; a row in the policy table that names +the advisory; a case in the test corpus that builds the triggering file +from bytes, with nothing hostile checked in; and a test that the check +refuses it with a reason an operator can act on. Where our reader must +agree with the real decoder, a further test opens a real file with Pillow +and compares. + +The reason is a release rule. Every default refusal is a breaking change: +a file that passed last week and is refused this week is a change the +operator must be able to see in the changelog, name in the policy, and +turn off. A tweak to a constant gives them none of that. So a field whose +default refuses the file ships as a breaking release, and one that merely +lets the operator refuse it ships as a feature. sillybos went from 1.0 to +4.0 in its first day largely because of this rule, and we think that is +the rule working, not failing. + +## The record, and the tests that enforce it + +Each triaged advisory ends as one JSON file in the repository: the facts +from the advisory, how the triggering input reaches the flaw, the bucket +and the finding, which check refuses it and under which policy, the tests +that prove that, and how to protect yourself with the library and +without it. The first line of every "how to protect yourself" entry is the +fixed version. Nothing here is a substitute for upgrading. + +The field that makes the record worth trusting is the list of tests. A +record in bucket A, B or B2 claims that a file is refused, and the claim +must name at least one test, by its full path, that builds the file and +proves the refusal. The test suite reads every record and checks that the +tests it names exist. A record can therefore not claim more than the code +does, and a refactor that drops a test breaks the build rather than +leaving a stale claim in a security page. + +A script merges the files into one and the suite keeps that merged file +current. The [security watch]({{< relref "/security/_index.md" >}}) on +this site is built from it at build time: a row per advisory, with the +bucket, the trigger, the refusal where there is one, and links to OSV and +the advisory database for everything else. The page is rebuilt every +Monday, two hours after the fetch, through a deploy hook, so a record +promoted on a Friday is on the site the next week with nobody having +edited a page. + +Nothing on that page is typed by hand. We learned that rule elsewhere: a +slide deck that carried transcribed benchmark numbers disagreed with the +harness within a fortnight, and nothing failed, and nobody noticed until +the two were read side by side. A security page that drifts from its +record would be worse than no page. So the page reads the record, the +record names the tests, and the tests run. + +## The backfill, and what a proposal is + +When the record was started, there were already more than six hundred +advisories on the watchlist, triaged in our heads over the preceding +months. Their buckets had been decided but never written down. We drew a +line: everything published from 2025 onwards was re-read against the +current checks and written up, a hundred or so records; the older ones +stay in the baseline file as seen but unrecorded. + +The re-reading was done with help from a model, and that raised a question +we had to answer carefully: what is a record that a machine drafted and no +person has confirmed? Our answer is a *proposal*. It has the same shape as +a record, sits in its own directory, says in its notes that it is not yet +confirmed, and is read by nothing except two commands. One lists what is +waiting, by bucket, with whatever is in the way of promoting it. The other +promotes a proposal, once a person has read the advisory and the finding +and agrees, into the record, dated that day. The export never includes a +proposal, so the security watch shows only what a maintainer has stood +behind. + +Listing the proposals had an effect we did not plan. Ten of them claimed +refusals the library could not yet make, and the command said so: a +ceiling on a single image dimension, a policy on embedded fonts in a PDF, +a policy on JBIG2 streams. The backlog of confirmation became a list of +the next three policies. The first shipped the same evening. + +## Keeping our own readers honest + +The header readers are small, and small code is auditable, but a reader +that is handed a damaged file must still answer: a header, or a refusal, +and either within a bounded time. A script in the test suite takes the +well-formed files of the hostile corpus, damages them at random, and runs +every reader on the result; any exception that is not the reader's own +refusal, and any file that takes more than a few seconds, fails. It runs +for thirty seconds on every pull request and for ten minutes every Monday, +and in its first evening, at some millions of damaged files a minute, it +found nothing, which is the result we wanted and will keep checking. + +Around all of this sit the ordinary repository checks: secret scanning +over the whole history, a linter for the workflows themselves, a scanner +for the container images and configuration, and automated dependency +updates. They are the same checks across all of our repositories, so one +repository's finding is a template for the next. They catch the things the +advisory record is not for. + +## What it is not + +It is not a vulnerability database. OSV and the GitHub Advisory Database +are, and every row links to them. It is not an automated triage: the +filters label and the person decides, and we would rather a slow Monday +than a confident wrong bucket. And it is not a claim that the check +prevents everything: a row says *refused by default* only where a test +builds the file and proves it, and most rows say, in plain words, that +nothing before the decoder can help. + +What it is, is a way of answering the Monday question once, in writing, +with a test where a test is possible, so that the next person to ask it +reads the answer instead of the advisory. + +## Further reading + +### Handling advisories + +- Murugiah Souppaya and Karen Scarfone, *Guide to Enterprise Patch + Management Planning: Preventive Maintenance for Technology*, NIST + Special Publication 800-40 Revision 4, National Institute of Standards + and Technology, April 2022, + doi:[10.6028/NIST.SP.800-40r4](https://doi.org/10.6028/NIST.SP.800-40r4). + The case for treating patching as routine maintenance with a written + process rather than an emergency each time; our weekly fetch and the + bucket vocabulary are that process at the scale of one pipeline. +- ISO/IEC, *ISO/IEC 29147:2018, Information technology — Security + techniques — Vulnerability disclosure*, second edition, and *ISO/IEC + 30111:2019, Information technology — Security techniques — Vulnerability + handling processes*, second edition. The two standards for, respectively, + how a vulnerability is reported and disclosed and how a vendor handles + one internally. We are on the receiving end of the first and have + borrowed the shape of the second. + +### The data + +- OpenSSF Vulnerability Disclosures Working Group, *Open Source + Vulnerability (OSV) schema*, + [ossf.github.io/osv-schema](https://ossf.github.io/osv-schema/). The + format every advisory arrives in: identifiers and aliases, affected + ranges and fixed versions, severity vectors. The merging of a CVE's + three records into one is done on the alias field this schema defines. +- OSV, [osv.dev](https://osv.dev/), and GitHub, [GitHub Advisory + Database](https://github.com/advisories). The two sources the fetch + reads and the security watch links to. + +### Reading files safely + +- Len Sassaman, Meredith L. Patterson, Sergey Bratus and Michael E. + Locasto, "Security Applications of Formal Language Theory", *IEEE + Systems Journal* 7(3), 2013, pp. 489–500, + doi:[10.1109/JSYST.2012.2222000](https://doi.org/10.1109/JSYST.2012.2222000). + Why the bucket between "preventable from the header" and "needs + decoding" is a real boundary: a recogniser for the header is a small, + specifiable language, and the pixel data is not. +- Pillow, [Security](https://pillow.readthedocs.io/en/stable/handbook/security.html), + Pillow 13 documentation. The maintainers' own guidance, which the + "protect yourself" entries of the record repeat before anything of ours. diff --git a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md new file mode 100644 index 0000000..3cb3f21 --- /dev/null +++ b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md @@ -0,0 +1,236 @@ +--- +title: "Read the tag before you unroll the scroll" +date: 2026-11-01 +draft: false +slug: "read-the-tag-before-you-unroll-the-scroll" +kicker: "Security" +standfirst: "In October 2026 Pillow fixed more than thirty flaws at once, and one of them let a file's name become a command. A scanning pipeline cannot stop using decoders, but it can decide, from a file's first bytes and its header, whether a decoder should see it at all. That decision is now a library of its own, and this is why we built it" +author: stephen-masters +tags: [security, sillybos, pillow, poppler, project-notes] +--- + +A library in the ancient world kept its books as rolled scrolls, and a +scroll gives nothing away from the outside. To know what one held you +unrolled it, which is slow, and wears the papyrus, and in a large +collection is no way to find anything. So a small parchment tag, a +σίλλυβος, hung from the end of each roll with the title and the author on +it. Cicero had a set made for his library. The reader checked the tag, and +only then unrolled the scroll, or did not. + +An OCR pipeline is handed files it did not make, and every one of them is +a scroll. The decoders that open them, Pillow for images and poppler for +PDFs, are large and old and read formats of great complexity, and they +have flaws. The question this article is about is whether anything can be +read from the outside of a file before a decoder unrolls it. It can, it +turns out, and quite a lot. + +## October 2026 + +On 16 October 2026 the Pillow project released version 13.0.0 and, with +it, fixes for more than thirty security advisories. Several could be +reached by opening one crafted file. Two of them are worth describing, +because together they show the shape of the problem. + +The first was in the EPS reader. Pillow does not decode PostScript itself; +it hands the file to Ghostscript, as a separate program, with the file's +name on the command line. Nothing checked that name, so a name beginning +with a hyphen was read by Ghostscript as an option, and a researcher +showed the route from there to running a command, past Ghostscript's own +safe mode (CVE-2026-112900). The second was in the FlashPix reader, an +old Microsoft format kept in an OLE container: with the `olefile` +package installed, opening one could run code (CVE-2026-112398). + +Neither of these formats has any business in a scanning pipeline. No +scanner writes PostScript or FlashPix. The reason they were reachable at +all is that Pillow, sensibly, decides what a file is from its contents and +not from its name. A PostScript file called `page.png` is a PostScript +file, and until October it went to the PostScript reader. The extension +was never a defence, and for years nobody who ran scans through Pillow had +reason to notice. + +Pillow's own answer, which has been in its documentation for some time, +is the `formats` argument to `Image.open`: a list of the readers that may +be tried. Pass `["JPEG", "PNG", "TIFF"]` and a PostScript file is not a +PostScript file any more, it is an unrecognised one, and no reader runs on +it. That one argument closes both of the flaws above and a good many +others. It is, in the end, most of what the library this article is about +does. The rest is what follows once you take the idea seriously. + +## What can be read from the outside + +Suppose you accept the premise: a pipeline should decide whether to open +a file before any decoder opens it. What can it decide from? + +**The format, from the first bytes.** Every format a scanner writes +announces itself in its first few bytes, and so do most of the ones it +does not: PostScript, GIF, BMP, WebP, HEIF, JPEG 2000, BigTIFF, Photoshop, +the OLE container that holds FlashPix and old Office files, zip, gzip, +icons, XML. Reading those bytes is a table lookup, not a parse, and it +lets a refusal say *what* the file was, which is the first thing the +person running the batch wants to know. + +**The name against the contents.** A JPEG called `.png` would decode +perfectly well. We refuse it anyway, because a file whose name lies is not +one to trust, and because the lie is the thing the operator wants told +about. + +**The header, read with code of our own.** This is where it became a +library rather than a wrapper. A JPEG's dimensions, how its frame is +coded, and the size of its colour profile are in its segment headers. A +PNG's dimensions, bit depth, colour type and interlacing are in its first +chunk, and the size of every other chunk is in front of that chunk. A +TIFF's directory chain carries, for every frame, the dimensions, +compression scheme, colour model, samples and bits, tile size and +subsampling, and the position and size of every tag's data. Reading each +of these turned out to be a few dozen lines, with no decoder involved and +no dependency on one, and it is the reason the library has no dependencies +at all: it adds nothing to the attack surface it exists to reduce. + +**For a PDF, what poppler will say without rendering.** `pdfinfo` reports +the page count, encryption, the size of every page in points and whether +the document carries JavaScript or a form; `pdfdetach` lists attached +files. Both run as separate processes with a time limit, so a file that +makes a parser loop costs one file's failure and nothing more. + +From these, a policy can refuse a file for being too large, for having too +many pages, for a page that would decode to more pixels than the +machine should allocate, for a frame coding no scanner writes, for a +compression scheme that lives only in the least-exercised corner of +libtiff, for a metadata block the size of the file, for a PDF that would +make a viewer act rather than draw. Each refusal is a sentence: *a +lossless JPEG; the policy allows baseline, extended and progressive +frames*. The sentence is for the person, never a code. + +## The limits are the point, not the format + +The format check is what stops the October flaws. The limits are what +stop the next ones, and they deserve a word, because a limit that sounds +like belt-and-braces turns out to map onto real advisories with +uncomfortable precision. + +Take a pixel budget. Pillow has had one for years, the decompression-bomb +threshold, and it is a global that any library in the process can raise. +We enforce the same number ourselves, from the header, before Pillow is +asked. But a pixel budget alone lets through a page a few pixels wide and +a million tall, and an abnormally tall TIFF is exactly what one flaw in +libtiff's RGBA reader needed to write colour data to an arbitrary address +(CVE-2025-9900). So the policy also holds either side of a page, a frame +or a tile to a ceiling. No scanner writes a side longer than a few tens of +thousands of pixels; the default is three times the longest side of an A3 +page at 600 dpi, and nothing we have scanned comes near it. + +Or take TIFF compression. A scanner writes one of six schemes. libtiff +knows nineteen, and most of its security history lives in the other +thirteen. A scan never needs PixarLog, so the policy refuses it by name, +and the most recent PixarLog flaw (CVE-2026-12912) becomes a file that is +never opened. + +Or take a multi-frame TIFF whose second frame has a different colour mode +from its first. A decoder that sized its buffers for frame one and then +reads frame two writes past them (CVE-2026-96639). We walk the whole chain +before the file is opened and require every frame to agree. + +In each case the check reads something the header already says, costs +microseconds, and turns a decoder's flaw into a file that was refused with +a reason. The pattern repeats often enough that we have made it a rule: +a published advisory that can be prevented from a header field becomes a +policy field, with a default, a command-line option, and a case in a +hostile corpus that builds the triggering file from bytes and proves the +check refuses it. The [security watch]({{< relref "/security/_index.md" +>}}) is the record of which advisories that has been done for, and which +it cannot be done for, and why. How that record is kept is a story of its +own, told in [Keeping watch on the decoders]({{< relref +"/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md" >}}). + +## What it does not do + +A security library carries an implied promise, so this has to be said +plainly, and the library's README says it first. + +It does not protect against a flaw in the readers you *do* allow. A +crafted JPEG that exploits your JPEG decoder is a JPEG of a sensible size, +and it passes. What the check removes is every format you did not mean to +read, every file too large to be safe, every coding a scanner never +writes, and every structural lie the header can be caught in. For the +readers you keep, the advice is the old advice: update them, and decode in +a process with its own memory and time limits, which is a recipe we have +written down in the library's documentation. + +It does not scan for malware, repair a file, or read any format beyond the +four a scan can be. Adding a format is adding attack surface, and we will +add one when someone shows us a scan in it. + +## The library + +The check grew out of [Tetrak OCR]({{< relref "/ocr" >}}), where it now +sits in front of every scan: a verdict before any decoder opens a file, +with the reasons carried through to triage. It is a library of its own, +[sillybos]({{< relref "/sillybos.md" >}}), because most of the people who +need it will never install an OCR tool. A thumbnailer needs it, an upload +form needs it, anything that runs Pillow or poppler over files other +people made needs it. + +```python +from sillybos import check + +verdict = check("inbox/page-012.png") +if not verdict.ok: + quarantine(verdict.path, verdict.reasons) # ('says PNG, is PostScript',) +``` + +With Pillow installed, `open_checked` runs the check and then opens the +file with Pillow's `formats` list set from the policy. That is the October +fix, packaged, with everything the header can add to it in front. + +Read the tag. Then decide whether to unroll the scroll. + +## Further reading + +### The flaws + +- GitHub Advisory Database, [GHSA record for + CVE-2026-112900](https://github.com/advisories?query=CVE-2026-112900), + and the [Debian security tracker's + entry](https://security-tracker.debian.org/tracker/CVE-2026-112900). + The EPS filename flaw: affected from Pillow 2.6.0, fixed in 13.0.0. + The two scorings disagree, GitHub's critical against the maintainers' + moderate, because the attacker has to control the file name; a + pipeline that opens files from outside has handed that control over. +- OSV, [osv.dev](https://osv.dev/). The vulnerability database the + security watch is fed from, and where every row of it links. + +### Reading files safely + +- Len Sassaman, Meredith L. Patterson, Sergey Bratus and Michael E. + Locasto, "Security Applications of Formal Language Theory", *IEEE + Systems Journal* 7(3), 2013, pp. 489–500, + doi:[10.1109/JSYST.2012.2222000](https://doi.org/10.1109/JSYST.2012.2222000). + The case that input handling is a parsing problem and that a parser + should accept exactly the language it claims to and nothing else. Our + header readers are the small, fully specified recognisers this paper + argues for; the decoders behind them are the kind of parser it warns + about. +- Pillow, [Security](https://pillow.readthedocs.io/en/stable/handbook/security.html) + and the [`Image.open` + reference](https://pillow.readthedocs.io/en/stable/reference/Image.html), + Pillow 13 documentation. The `formats` allowlist and the + decompression-bomb threshold, with the maintainers' own advice to + restrict formats and never disable the limit in production. + +### The formats + +- Adobe Systems, *TIFF Revision 6.0*, 1992. The specification our TIFF + reader walks: the image file directory, the tag types, the strip and + tile layouts, and the compression codes the policy names. +- W3C, *Portable Network Graphics (PNG) Specification (Third Edition)*, + W3C Recommendation, 24 June 2025, + [w3.org/TR/png-3/](https://www.w3.org/TR/png-3/). The chunk structure, + the IHDR fields and, new in this edition, the animated PNG frames our + reader counts as pages. +- ITU-T, *Recommendation T.81: Digital compression and coding of + continuous-tone still images*, 1992 (also ISO/IEC 10918-1:1994). The + JPEG marker segments, including the start-of-frame markers whose codes + tell a baseline frame from a lossless or arithmetic one. +- ISO, *ISO 32000-2:2020, Document management — Portable document format + — Part 2: PDF 2.0*, second edition. The document catalogue, actions and + embedded files that the PDF policy refuses by default. From c4442a0661e759343d5c3498454f4de81d25f4cd Mon Sep 17 00:00:00 2001 From: Stephen Masters Date: Sun, 1 Nov 2026 23:25:13 +0000 Subject: [PATCH 2/7] docs(site): open on the October storm, and say where the model does the reading The first article now opens with the 2026 figures from the CVE Program's list as CyberHire counted them on 23 October, Anthropic's disclosure dashboard as of 2 October, and Pillow 13.0.0's thirty-eight security entries, each cited; then the staged decision to build a layer in front of the decoders, and why it became a library for anyone who runs Pillow or poppler over files they did not make. The second gains a section on the model's part in triage: the written procedure it follows, the rule that it proposes and a person decides, the backfill read as proposals, and the comment-on-issue step that is designed and not yet built, said as such. Co-authored-by: Yvette Mankerian Co-Authored-By: Claude Fable 5.1 --- ...026-11-01-keeping-watch-on-the-decoders.md | 65 +++++- ...ad-the-tag-before-you-unroll-the-scroll.md | 194 ++++++++++++------ 2 files changed, 194 insertions(+), 65 deletions(-) diff --git a/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md b/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md index 7e098f7..5d7711f 100644 --- a/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md +++ b/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md @@ -4,7 +4,7 @@ date: 2026-11-01 draft: false slug: "keeping-watch-on-the-decoders" kicker: "Security" -standfirst: "Six libraries decode every scan we read, and between them they publish a security advisory most weeks. This is how we turn that stream into a weekly issue, a bucket, a test and a published record, with a person in the middle and nothing transcribed by hand" +standfirst: "Eight libraries decode every scan we read, and in 2026 the flaws found in software like them more than doubled. Two people cannot read that stream by hand. This is how we turn it into a weekly issue, a bucket, a test and a published record, with a model doing the first reading, a person deciding, and nothing transcribed by hand" author: stephen-masters tags: [security, advisories, sillybos, automation, project-notes] --- @@ -17,6 +17,17 @@ paragraph of text and a severity score, and poses the same question to everyone who runs the library: *does this reach me, and what do I do about it?* +The stream is getting faster. The count of published vulnerabilities in +2026 more than doubled on the year before, and the finding is now partly +automated: records that credit an AI finder went from a few dozen in the +whole of 2025 to several hundred by October, and the labs doing the +finding say openly that human triage, not discovery, is what limits the +rate. We wrote about the month that made this concrete for us, and what we +built in response, in [Read the tag before you unroll the scroll]({{< +relref "/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md" +>}}). This article is about the other half: how a project with two people +on it keeps up with a stream that is sized for a security team. + The usual tools do not answer it. A dependency scanner tells you that a version you install has an advisory against it; it cannot tell you whether the flaw is in a command-line tool you never run, a save path you @@ -100,6 +111,53 @@ is as valuable as the refusals: the next time a flaw lands in libtiff's PixarLog codec, the record already says that a scan never needs PixarLog and the policy refuses it, and nobody re-reads the codec. +## Where the model comes in + +Two people cannot read a hundred advisories a month with the care the +buckets demand, and we do not pretend to. The reading is done with a +model, and the way it is done matters more than the fact of it. + +The triage is a written procedure, kept as a skill that Claude follows in +a session: four questions, in order, with the commands to answer each. +*Do we use it?* is answered by searching every lock file, every +`pyproject.toml` and every Dockerfile across our repositories, because a +package can hide behind an OCR engine's extras or inside a base image +that no lock file lists. *Does the flaw reach us?* is answered against a +threat model that lists every door through which something from outside +can arrive, with the file that proves a feature unused where that is the +answer. *Is there a fix?* and *where must it be fixed?* follow, with the +four places a fix can need to land: the lock file, the running images, +the laptops, the packages we publish. Urgency is expressed in our own +terms, a table whose rows are how the trigger reaches us and whose columns +are what the flaw does, so that "a harvested record can carry it and it +runs code" means *today* and "only something run by hand on a laptop, and +it crashes" means *this week*. Every answer, including "not affected", is +logged. + +The model does the reading and the searching, and proposes. A person +decides. That is not modesty about the model, whose reading is usually +right; it is the rule that keeps the record honest, because a bucket is a +claim about our code, and the claim's author has to be someone who can be +asked why. When the record was started, the backfill of a hundred or so +advisories was re-read by the model in an evening, and every one of them +is marked as a proposal until a person has read it and promoted it, as +the next section describes. The design for the weekly stream is the same +shape: a model will read each new issue as it is opened and post a +*proposed* bucket and finding as a comment, for the maintainer to confirm +or overrule. It will post a comment and never file a bucket or close an +issue; it will read the advisory's text as data and not as instructions; +and nothing from private notes will go into a comment, since the issues +are public. That step is designed and not yet built, and the guide says +so rather than describing it as if it were. + +This is what lets a small project be responsive. The machine fetches, +filters and files on Monday morning; the model has read and proposed by +the time a person sits down; the person's job is to confirm, overrule, +and write the test. The time that used to go into finding and reading +goes into the one part that needs a human, and the record of what was +decided is public, cited and checked by the test suite rather than kept +in anyone's head. + ## A B finding becomes a test, never a quiet change Bucket B is where the work is, and it has a rule attached. A finding that @@ -219,6 +277,11 @@ reads the answer instead of the advisory. ### Handling advisories +- Anthropic, *Coordinated vulnerability disclosure dashboard*, + [red.anthropic.com/2026/cvd](https://red.anthropic.com/2026/cvd/), + figures as of 2 October 2026. Where the rate described in the opening + comes from, and the statement that human triage is the limiting step; + the same constraint our Monday is built around. - Murugiah Souppaya and Karen Scarfone, *Guide to Enterprise Patch Management Planning: Preventive Maintenance for Technology*, NIST Special Publication 800-40 Revision 4, National Institute of Standards diff --git a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md index 3cb3f21..8626252 100644 --- a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md +++ b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md @@ -3,8 +3,8 @@ title: "Read the tag before you unroll the scroll" date: 2026-11-01 draft: false slug: "read-the-tag-before-you-unroll-the-scroll" -kicker: "Security" -standfirst: "In October 2026 Pillow fixed more than thirty flaws at once, and one of them let a file's name become a command. A scanning pipeline cannot stop using decoders, but it can decide, from a file's first bytes and its header, whether a decoder should see it at all. That decision is now a library of its own, and this is why we built it" +kicker: "The field" +standfirst: "In 2026 the number of published vulnerabilities more than doubled, and in October Pillow fixed thirty-eight security flaws in one release. A scanning pipeline cannot stop using decoders, but it can decide, from a file's first bytes and its header, whether a decoder should see it at all. We built that decision for ourselves, then made it a library, and this is why" author: stephen-masters tags: [security, sillybos, pillow, poppler, project-notes] --- @@ -20,16 +20,39 @@ only then unrolled the scroll, or did not. An OCR pipeline is handed files it did not make, and every one of them is a scroll. The decoders that open them, Pillow for images and poppler for PDFs, are large and old and read formats of great complexity, and they -have flaws. The question this article is about is whether anything can be -read from the outside of a file before a decoder unrolls it. It can, it -turns out, and quite a lot. - -## October 2026 - -On 16 October 2026 the Pillow project released version 13.0.0 and, with -it, fixes for more than thirty security advisories. Several could be -reached by opening one crafted file. Two of them are worth describing, -because together they show the shape of the problem. +have flaws. This article is about the month that made us take those flaws +seriously, what we decided to do about them, and why the result is a +library anyone can use rather than a corner of our own code. + +## The October storm + +Something changed in 2026 in how fast security flaws are found. The +numbers are stark enough to give plainly, with their source. An analysis +of the CVE Program's full list, taken on 23 October, counted 86,292 CVEs +published since the start of the year, against 38,569 in the same window +of 2025: more than double, and already more than the whole of 2025. The +third quarter of 2026 alone held more CVEs than any full year before 2024. +September had three and a half times as many as the September before. + +The analysis also counted the records that credit an AI system, or an AI +lab's research team, as the finder: 34 in the whole of 2025 and 769 by +late October 2026, with the monthly figure rising through the year from +18 in January to 199 in October with a week still to run. That is under +one per cent of the year's CVEs and the author calls it a floor, since +most vendors do not say who found their bugs. Anthropic's own disclosure +dashboard gives a sense of the volume behind the floor: as of 2 October it +had disclosed 6,157 vulnerabilities across 591 open source projects, from +nearly thirty thousand candidates, and it says in plain words that human +triage is the rate-limiting step and that there are confirmed bugs not yet +reported to maintainers for want of capacity. A dashboard like that does +not describe a spike. It describes a new rate, limited by how fast people +can read, and the reading is being automated too. + +The press called it the October vulnerability storm. For a project that +reads scans, the storm had one address. On 16 October Pillow released +version 13.0.0 with thirty-eight security entries in its notes, two of +them critical, most of them reachable by opening one crafted file. Two are +worth describing, because together they show the shape of the problem. The first was in the EPS reader. Pillow does not decode PostScript itself; it hands the file to Ghostscript, as a separate program, with the file's @@ -48,18 +71,45 @@ file, and until October it went to the PostScript reader. The extension was never a defence, and for years nobody who ran scans through Pillow had reason to notice. -Pillow's own answer, which has been in its documentation for some time, -is the `formats` argument to `Image.open`: a list of the readers that may -be tried. Pass `["JPEG", "PNG", "TIFF"]` and a PostScript file is not a -PostScript file any more, it is an unrecognised one, and no reader runs on -it. That one argument closes both of the flaws above and a good many -others. It is, in the end, most of what the library this article is about -does. The rest is what follows once you take the idea seriously. - -## What can be read from the outside - -Suppose you accept the premise: a pipeline should decide whether to open -a file before any decoder opens it. What can it decide from? +## What we decided + +We read the October advisories against our own code in a sitting, and +the first conclusion was uncomfortable: the only gate in front of our +decoders was the file's extension. The second was more useful. Nearly +everything the advisories needed was visible from outside the file, before +any decoder ran. + +So we decided to build a layer whose only job is to decide whether a file +may be opened, and we staged it. Stage zero was an afternoon: Pillow's +`Image.open` takes a `formats` argument, a list of the readers it may try, +and passing `["JPEG", "PNG", "TIFF"]` means a PostScript file is not a +PostScript file any more but an unrecognised one, and no reader runs on +it. That one argument, with an explicit pixel limit and a page cap on PDF +rendering, closed the October paths. Stage one was the check proper: the +format from the first bytes, the name against the contents, the header +read without decoding, the features of a PDF that a scan never has, and a +refusal that goes to the pipeline's triage queue with a reason rather than +a silent drop. Stage two is decoding in a boxed process with memory and +time limits, for the flaws nobody has announced yet. Stage three is the +same check as the front door of the platform, where files will arrive +from partner catalogues, one more step removed from anyone we know. + +Stage one is where we noticed that the thing we were building was not +really about OCR. A thumbnailer needs it. An upload form needs it. A +service that converts documents needs it. Anything that runs Pillow or +poppler over files other people made has exactly our problem, and most of +the people who have it will never install an OCR tool. So the check +became a library of its own, [sillybos]({{< relref "/sillybos.md" >}}), +MIT licensed, with no dependencies at all, because a security library +that pulls in a parser adds to the attack surface it exists to reduce. +Tetrak OCR was its first user and calls it in front of every scan. + +## What sillybos does + +The check reads what can be read from the outside of a file, in order, +and stops at the first thing it does not like. + +**The size**, from the file system, before anything reads the file. **The format, from the first bytes.** Every format a scanner writes announces itself in its first few bytes, and so do most of the ones it @@ -67,12 +117,13 @@ does not: PostScript, GIF, BMP, WebP, HEIF, JPEG 2000, BigTIFF, Photoshop, the OLE container that holds FlashPix and old Office files, zip, gzip, icons, XML. Reading those bytes is a table lookup, not a parse, and it lets a refusal say *what* the file was, which is the first thing the -person running the batch wants to know. +person running the batch wants to know. Only JPEG, PNG, TIFF and PDF can +pass. **The name against the contents.** A JPEG called `.png` would decode -perfectly well. We refuse it anyway, because a file whose name lies is not -one to trust, and because the lie is the thing the operator wants told -about. +perfectly well. It is refused anyway, because a file whose name lies is +not one to trust, and because the lie is the thing the operator wants +told about. **The header, read with code of our own.** This is where it became a library rather than a wrapper. A JPEG's dimensions, how its frame is @@ -83,8 +134,7 @@ TIFF's directory chain carries, for every frame, the dimensions, compression scheme, colour model, samples and bits, tile size and subsampling, and the position and size of every tag's data. Reading each of these turned out to be a few dozen lines, with no decoder involved and -no dependency on one, and it is the reason the library has no dependencies -at all: it adds nothing to the attack surface it exists to reduce. +no dependency on one. **For a PDF, what poppler will say without rendering.** `pdfinfo` reports the page count, encryption, the size of every page in points and whether @@ -92,14 +142,29 @@ the document carries JavaScript or a form; `pdfdetach` lists attached files. Both run as separate processes with a time limit, so a file that makes a parser loop costs one file's failure and nothing more. -From these, a policy can refuse a file for being too large, for having too -many pages, for a page that would decode to more pixels than the -machine should allocate, for a frame coding no scanner writes, for a -compression scheme that lives only in the least-exercised corner of -libtiff, for a metadata block the size of the file, for a PDF that would -make a viewer act rather than draw. Each refusal is a sentence: *a -lossless JPEG; the policy allows baseline, extended and progressive -frames*. The sentence is for the person, never a code. +**The limits**, against what the header said, from a policy set from your +own largest real files. A file is refused for being too large, for having +too many pages, for a page that would decode to more pixels than the +machine should allocate, for a side longer than any scanner writes, for a +frame coding no scanner uses, for a compression scheme that lives only in +the least-exercised corner of libtiff, for a metadata block the size of +the file, for a PDF that would make a viewer act rather than draw. Each +refusal is a sentence: *a lossless JPEG; the policy allows baseline, +extended and progressive frames*. The sentence is for the person, never a +code. + +```python +from sillybos import check + +verdict = check("inbox/page-012.png") +if not verdict.ok: + quarantine(verdict.path, verdict.reasons) # ('says PNG, is PostScript',) +``` + +With Pillow installed, `open_checked` runs the check and then opens the +file with Pillow's `formats` list set from the policy. That is the October +fix, packaged, with everything the header can add to it in front. There +is a command, `sillybos scans/*`, for a shell pipeline or a Dockerfile. ## The limits are the point, not the format @@ -127,8 +192,9 @@ never opened. Or take a multi-frame TIFF whose second frame has a different colour mode from its first. A decoder that sized its buffers for frame one and then -reads frame two writes past them (CVE-2026-96639). We walk the whole chain -before the file is opened and require every frame to agree. +reads frame two writes past them (CVE-2026-96639, one of October's two +critical entries). We walk the whole chain before the file is opened and +require every frame to agree. In each case the check reads something the header already says, costs microseconds, and turns a decoder's flaw into a file that was refused with @@ -138,8 +204,9 @@ policy field, with a default, a command-line option, and a case in a hostile corpus that builds the triggering file from bytes and proves the check refuses it. The [security watch]({{< relref "/security/_index.md" >}}) is the record of which advisories that has been done for, and which -it cannot be done for, and why. How that record is kept is a story of its -own, told in [Keeping watch on the decoders]({{< relref +it cannot be done for, and why. How two people keep that record current +against the rate described above is a story of its own, told in [Keeping +watch on the decoders]({{< relref "/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md" >}}). ## What it does not do @@ -160,32 +227,31 @@ It does not scan for malware, repair a file, or read any format beyond the four a scan can be. Adding a format is adding attack surface, and we will add one when someone shows us a scan in it. -## The library - -The check grew out of [Tetrak OCR]({{< relref "/ocr" >}}), where it now -sits in front of every scan: a verdict before any decoder opens a file, -with the reasons carried through to triage. It is a library of its own, -[sillybos]({{< relref "/sillybos.md" >}}), because most of the people who -need it will never install an OCR tool. A thumbnailer needs it, an upload -form needs it, anything that runs Pillow or poppler over files other -people made needs it. - -```python -from sillybos import check - -verdict = check("inbox/page-012.png") -if not verdict.ok: - quarantine(verdict.path, verdict.reasons) # ('says PNG, is PostScript',) -``` - -With Pillow installed, `open_checked` runs the check and then opens the -file with Pillow's `formats` list set from the policy. That is the October -fix, packaged, with everything the header can add to it in front. - Read the tag. Then decide whether to unroll the scroll. ## Further reading +### The storm + +- Mike Carthy, "More CVEs in Q3 2026 than in any full year before 2024", + CyberHire, 23 October 2026, + [cyber-hire.com/blog/cve-volume-2026](https://cyber-hire.com/blog/cve-volume-2026). + The count behind the figures above, from the CVE Program's full list + downloaded that day: year-on-year totals, the quarter and month + comparisons, and the rise in records crediting an AI finder, with the + author's own caution that the data cannot prove cause. +- Anthropic, *Coordinated vulnerability disclosure dashboard*, + [red.anthropic.com/2026/cvd](https://red.anthropic.com/2026/cvd/), + figures as of 2 October 2026. The pipeline from candidates to + disclosed findings to upstream patches, and the statement that human + triage is the rate-limiting step. We cite it for the rate; our own + triage, described in the companion article, is shaped by the same + constraint at a much smaller scale. +- Pillow, [13.0.0 release + notes](https://pillow.readthedocs.io/en/stable/releasenotes/13.0.0.html), + 16 October 2026. The thirty-eight security entries by severity, with + their advisory identifiers. + ### The flaws - GitHub Advisory Database, [GHSA record for From ad6afd8f262af8528de87e3635e0a85cfa5aed80 Mon Sep 17 00:00:00 2001 From: Stephen Masters Date: Sun, 1 Nov 2026 23:35:56 +0000 Subject: [PATCH 3/7] docs(site): give the scroll tag's name in Latin letters Co-authored-by: Yvette Mankerian Co-Authored-By: Claude Fable 5.1 --- .../2026/11/2026-11-01-keeping-watch-on-the-decoders.md | 2 +- ...2026-11-01-read-the-tag-before-you-unroll-the-scroll.md | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md b/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md index 5d7711f..84be03e 100644 --- a/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md +++ b/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md @@ -9,7 +9,7 @@ author: stephen-masters tags: [security, advisories, sillybos, automation, project-notes] --- -A digitisation pipeline rests on a short list of libraries it did not +A digitisation pipeline relies on a short list of libraries it did not write: Pillow, libtiff, libpng, libjpeg-turbo, zlib, OpenJPEG, FreeType and poppler. Between them they publish a security advisory most weeks, and in a bad month, as October 2026 was, several dozen. Each one arrives as a diff --git a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md index 8626252..fc738cd 100644 --- a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md +++ b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md @@ -10,11 +10,12 @@ tags: [security, sillybos, pillow, poppler, project-notes] --- A library in the ancient world kept its books as rolled scrolls, and a -scroll gives nothing away from the outside. To know what one held you +scroll gives nothing away from the outside. To know which you held, you unrolled it, which is slow, and wears the papyrus, and in a large collection is no way to find anything. So a small parchment tag, a -σίλλυβος, hung from the end of each roll with the title and the author on -it. Cicero had a set made for his library. The reader checked the tag, and +*sillybos* (say it *SIL-lee-boss*; Cicero's Latin made it *sittybus*), +hung from the end of each roll with the title and the author on it. He +had a set made for his library. The reader checked the tag, and only then unrolled the scroll, or did not. An OCR pipeline is handed files it did not make, and every one of them is From 82d2d20b1be92022b183065f87da9a42f9b19e56 Mon Sep 17 00:00:00 2001 From: Stephen Masters Date: Sun, 1 Nov 2026 23:45:19 +0000 Subject: [PATCH 4/7] docs(site): a released fix is not an installed one; Marker's Pillow pin Co-authored-by: Yvette Mankerian Co-Authored-By: Claude Fable 5.1 --- ...read-the-tag-before-you-unroll-the-scroll.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md index fc738cd..db362d7 100644 --- a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md +++ b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md @@ -14,7 +14,7 @@ scroll gives nothing away from the outside. To know which you held, you unrolled it, which is slow, and wears the papyrus, and in a large collection is no way to find anything. So a small parchment tag, a *sillybos* (say it *SIL-lee-boss*; Cicero's Latin made it *sittybus*), -hung from the end of each roll with the title and the author on it. He +hung from the end of each roll with the title and the author on it. Cicero had a set made for his library. The reader checked the tag, and only then unrolled the scroll, or did not. @@ -72,6 +72,21 @@ file, and until October it went to the PostScript reader. The extension was never a defence, and for years nobody who ran scans through Pillow had reason to notice. +A fix that has been released is not a fix that is installed. The tools +built on top of Pillow decide which Pillow you run, and they are not in a +hurry. Marker, the PDF-to-markdown converter we had used as one of our +OCR backends, published a new release on 29 October, two weeks after +Pillow 13.0.0, and it still requires a Pillow below version 11, two major +versions behind the fix; Surya, the recogniser underneath it, pins the +same. Anyone who installs Marker today gets a Pillow with October's flaws +in it, and there is nothing they can do about that short of forking. We +withdrew the Marker backend from [Tetrak OCR]({{< relref "/ocr" >}}) +rather than hold the whole pipeline on an old Pillow, and we will bring it +back when its pin moves. That is the general shape of the problem: your +decoder's version is set by the slowest pin in the tree above it, and a +defence that depends on the fixed version being installed is a defence +you do not control. + ## What we decided We read the October advisories against our own code in a sitting, and From 441d890afa4999ed13c44c4a27d43e1f3bafdf33 Mon Sep 17 00:00:00 2001 From: Stephen Masters Date: Mon, 2 Nov 2026 00:34:00 +0000 Subject: [PATCH 5/7] docs(site): wording in the article's name-against-contents paragraph Co-authored-by: Yvette Mankerian Co-Authored-By: Claude Fable 5.1 --- .../11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md index db362d7..98ee28f 100644 --- a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md +++ b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md @@ -139,7 +139,7 @@ pass. **The name against the contents.** A JPEG called `.png` would decode perfectly well. It is refused anyway, because a file whose name lies is not one to trust, and because the lie is the thing the operator wants -told about. +to be told about. **The header, read with code of our own.** This is where it became a library rather than a wrapper. A JPEG's dimensions, how its frame is From 0fa4886df158601678b7bf0669fe9515d48b5151 Mon Sep 17 00:00:00 2001 From: Stephen Masters Date: Mon, 2 Nov 2026 00:34:03 +0000 Subject: [PATCH 6/7] docs(site): open the sillybos page with the scroll-tag story Co-authored-by: Yvette Mankerian Co-Authored-By: Claude Fable 5.1 --- site/content/sillybos.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/site/content/sillybos.md b/site/content/sillybos.md index 22fbca2..f393cbc 100644 --- a/site/content/sillybos.md +++ b/site/content/sillybos.md @@ -7,6 +7,13 @@ description: "sillybos: a dependency-free Python library and command that checks ## What it is for +A σίλλυβος (*sillybos*, say it *SIL-lee-boss*; Latin *sittybus*) was the +little parchment tag that hung from a rolled scroll in an ancient library, +carrying its title and author, so that a reader could tell what a scroll +was without unrolling it. Cicero had them made for his books. This library +is that tag for the files a scanning or OCR pipeline is handed: it reads +the tag, and says whether the scroll should be unrolled at all. + Every program that reads scans hands each file to a decoder: Pillow for images, poppler for PDFs, then an OCR engine. Decoders are large, old programs that read complicated formats, and they have flaws. In October @@ -15,13 +22,6 @@ computer when an EPS file was opened, and a file's extension was no protection, because Pillow decides what a file is from its contents, so a PostScript file named `page.png` went straight to the PostScript reader. -A σίλλυβος (*sillybos*, say it *SIL-lee-boss*; Latin *sittybus*) was the -little parchment tag that hung from a rolled scroll in an ancient library, -carrying its title and author, so that a reader could tell what a scroll -was without unrolling it. Cicero had them made for his books. This library -is that tag for the files a scanning or OCR pipeline is handed: it reads -the tag, and says whether the scroll should be unrolled at all. - ## Who it is for Anyone who runs Pillow or poppler over files they did not make: an OCR From 05415f3a2ffdb23d29219950dbb183c809733502 Mon Sep 17 00:00:00 2001 From: Stephen Masters Date: Mon, 2 Nov 2026 15:09:29 +0000 Subject: [PATCH 7/7] docs(site): tighten the wording of the two sillybos articles Plainer sentences in the opening and the storm section of the scroll article, the PHP headlines as the storm's public face, and a shorter backfill section in the advisory-watch article. Co-authored-by: Yvette Mankerian Co-Authored-By: Claude Fable 5.1 --- ...026-11-01-keeping-watch-on-the-decoders.md | 65 +++++++++---------- ...ad-the-tag-before-you-unroll-the-scroll.md | 51 +++++++-------- 2 files changed, 55 insertions(+), 61 deletions(-) diff --git a/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md b/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md index 84be03e..fd6aee2 100644 --- a/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md +++ b/site/content/articles/2026/11/2026-11-01-keeping-watch-on-the-decoders.md @@ -17,31 +17,32 @@ paragraph of text and a severity score, and poses the same question to everyone who runs the library: *does this reach me, and what do I do about it?* -The stream is getting faster. The count of published vulnerabilities in -2026 more than doubled on the year before, and the finding is now partly -automated: records that credit an AI finder went from a few dozen in the -whole of 2025 to several hundred by October, and the labs doing the -finding say openly that human triage, not discovery, is what limits the -rate. We wrote about the month that made this concrete for us, and what we -built in response, in [Read the tag before you unroll the scroll]({{< -relref "/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md" ->}}). This article is about the other half: how a project with two people -on it keeps up with a stream that is sized for a security team. - -The usual tools do not answer it. A dependency scanner tells you that a -version you install has an advisory against it; it cannot tell you -whether the flaw is in a command-line tool you never run, a save path you -never take, or the reader a scanned page goes through every time. For a -long while our answer was to read each advisory when we noticed it, decide -in our heads, and upgrade. The decisions were not written down, so when -the next advisory in the same corner of libtiff arrived, the reading -started again from nothing. +The stream is becoming a torrent. The count of published vulnerabilities in +2026 more than doubled compared to the year before, and the finding is +now partly automated: records that credit an AI finder went from a few +dozen in the whole of 2025 to several hundred by October, and the labs +doing the finding say openly that human triage, not discovery, is what +limits the rate. We wrote about the month that made this concrete for us, +and what we built in response, in +[Read the tag before you unroll the scroll]({{}}). +This article is about the other half: how a project with two people +on it keeps up with a stream that usually needs a significant security +team. + +The usual tools are limited. A dependency scanner +tells you that a version you install has an advisory against it; it +cannot tell you whether the flaw is in a command-line tool you never run, +a save path you never take, or the reader a scanned page goes through +every time. We knew that the usual approach of reading each advisory +when we noticed it, deciding in our heads, and upgrading, would not scale +for our small open source project. This article is about what we built instead, in the course of building [sillybos]({{< relref "/sillybos.md" >}}), the check that runs before any decoder opens a file. The pieces are small. What matters is the shape: -machines fetch and file, a person decides, and every decision becomes -either a test or a sentence that says why there cannot be one. +machines fetch and file, a person decides, and every decision about a CVE +becomes either a test or a sentence that says why we are not implementing +a solution for it. ## The stream @@ -77,22 +78,22 @@ headline alone for the verbs of the write path: *save*, *encode*, *write*, *append*. One looks for the names of Pillow modules that `Image.open` never touches: the font renderer, the drawing API, the viewer. -The rule for these filters is the one rule in the whole system we would +The rule for these filters is the one rule in the system we would defend hardest: they label, and they never drop. The words filter reads only the headline because a long write-up of a read-path flaw mentions "writes" somewhere, and a label that nearly every advisory carries says nothing. "Out-of-bounds write" is blanked out before the search, because it describes a memory fault and not the save path. Even so, the filters -are wrong sometimes, in both directions, and the issue body lists what -matched so that the person reading it can overrule the label in a glance. -The point of a filter is to let the reader start with the likely-irrelevant -ones, not to let them skip anything. +are wrong sometimes, with both false positives and false negatives. +The issue body lists what matched so that the person reading it can +overrule the label in a glance. The point of a filter is to let the +reader focus on what is probably most important to them to review. ## A person, and seven buckets Someone reads each issue. The reading answers one question, *is this reached by opening a file?*, and files the advisory in a bucket. The -buckets are the vocabulary of the whole system, so here they are. +buckets are the vocabulary of this triage system. | Bucket | Meaning | What follows | |---|---|---| @@ -109,7 +110,7 @@ against a decoder are in code a scan never runs, or in the decoding itself, where nothing read from the outside can help. Writing that down is as valuable as the refusals: the next time a flaw lands in libtiff's PixarLog codec, the record already says that a scan never needs PixarLog -and the policy refuses it, and nobody re-reads the codec. +and the policy refuses it, and nobody needs to re-read the codec. ## Where the model comes in @@ -217,11 +218,9 @@ record names the tests, and the tests run. ## The backfill, and what a proposal is When the record was started, there were already more than six hundred -advisories on the watchlist, triaged in our heads over the preceding -months. Their buckets had been decided but never written down. We drew a -line: everything published from 2025 onwards was re-read against the -current checks and written up, a hundred or so records; the older ones -stay in the baseline file as seen but unrecorded. +advisories on the watchlist. Everything published from 2025 onwards +was re-read against the current checks and written up, a hundred or so +records; the older ones stay in the baseline file as seen but unrecorded. The re-reading was done with help from a model, and that raised a question we had to answer carefully: what is a record that a machine drafted and no diff --git a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md index 98ee28f..7ef9875 100644 --- a/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md +++ b/site/content/articles/2026/11/2026-11-01-read-the-tag-before-you-unroll-the-scroll.md @@ -9,9 +9,8 @@ author: stephen-masters tags: [security, sillybos, pillow, poppler, project-notes] --- -A library in the ancient world kept its books as rolled scrolls, and a -scroll gives nothing away from the outside. To know which you held, you -unrolled it, which is slow, and wears the papyrus, and in a large +A library in the ancient world kept its books as rolled scrolls, and you can't see what is on a scroll from outside. To know, you +need to unroll it, which is slow and wears the papyrus, and in a large collection is no way to find anything. So a small parchment tag, a *sillybos* (say it *SIL-lee-boss*; Cicero's Latin made it *sittybus*), hung from the end of each roll with the title and the author on it. Cicero @@ -19,7 +18,7 @@ had a set made for his library. The reader checked the tag, and only then unrolled the scroll, or did not. An OCR pipeline is handed files it did not make, and every one of them is -a scroll. The decoders that open them, Pillow for images and poppler for +like a scroll: you don't know what is in it until you open it. The decoders that open them, Pillow for images and poppler for PDFs, are large and old and read formats of great complexity, and they have flaws. This article is about the month that made us take those flaws seriously, what we decided to do about them, and why the result is a @@ -28,7 +27,7 @@ library anyone can use rather than a corner of our own code. ## The October storm Something changed in 2026 in how fast security flaws are found. The -numbers are stark enough to give plainly, with their source. An analysis +numbers are stark. An analysis of the CVE Program's full list, taken on 23 October, counted 86,292 CVEs published since the start of the year, against 38,569 in the same window of 2025: more than double, and already more than the whole of 2025. The @@ -45,15 +44,12 @@ dashboard gives a sense of the volume behind the floor: as of 2 October it had disclosed 6,157 vulnerabilities across 591 open source projects, from nearly thirty thousand candidates, and it says in plain words that human triage is the rate-limiting step and that there are confirmed bugs not yet -reported to maintainers for want of capacity. A dashboard like that does -not describe a spike. It describes a new rate, limited by how fast people -can read, and the reading is being automated too. +reported to maintainers for want of capacity. That's more than just a spike; it's most likely a new rate. -The press called it the October vulnerability storm. For a project that -reads scans, the storm had one address. On 16 October Pillow released +The press called it the October vulnerability storm, and serious vulnerabilities in the language PHP dominated the headlines with many websites (many of them from governments) shutting down until they could patch. But for a project that +reads scans, the storm had a different epicentre. On 16 October Pillow released version 13.0.0 with thirty-eight security entries in its notes, two of -them critical, most of them reachable by opening one crafted file. Two are -worth describing, because together they show the shape of the problem. +them critical, most of them reachable by opening one crafted file. Two in particular show the shape of the problem. The first was in the EPS reader. Pillow does not decode PostScript itself; it hands the file to Ghostscript, as a separate program, with the file's @@ -62,7 +58,7 @@ with a hyphen was read by Ghostscript as an option, and a researcher showed the route from there to running a command, past Ghostscript's own safe mode (CVE-2026-112900). The second was in the FlashPix reader, an old Microsoft format kept in an OLE container: with the `olefile` -package installed, opening one could run code (CVE-2026-112398). +package installed, opening a file could run code (CVE-2026-112398). Neither of these formats has any business in a scanning pipeline. No scanner writes PostScript or FlashPix. The reason they were reachable at @@ -128,8 +124,7 @@ and stops at the first thing it does not like. **The size**, from the file system, before anything reads the file. **The format, from the first bytes.** Every format a scanner writes -announces itself in its first few bytes, and so do most of the ones it -does not: PostScript, GIF, BMP, WebP, HEIF, JPEG 2000, BigTIFF, Photoshop, +announces itself in its first few bytes, and so do most other formats: PostScript, GIF, BMP, WebP, HEIF, JPEG 2000, BigTIFF, Photoshop, the OLE container that holds FlashPix and old Office files, zip, gzip, icons, XML. Reading those bytes is a table lookup, not a parse, and it lets a refusal say *what* the file was, which is the first thing the @@ -137,9 +132,9 @@ person running the batch wants to know. Only JPEG, PNG, TIFF and PDF can pass. **The name against the contents.** A JPEG called `.png` would decode -perfectly well. It is refused anyway, because a file whose name lies is -not one to trust, and because the lie is the thing the operator wants -to be told about. +perfectly well. It is refused anyway, because a file whose name is a +lie is not to be trusted, and because the lie is the thing the operator +wants to be told about. **The header, read with code of our own.** This is where it became a library rather than a wrapper. A JPEG's dimensions, how its frame is @@ -182,12 +177,12 @@ file with Pillow's `formats` list set from the policy. That is the October fix, packaged, with everything the header can add to it in front. There is a command, `sillybos scans/*`, for a shell pipeline or a Dockerfile. -## The limits are the point, not the format +## The limits are more important than the formats The format check is what stops the October flaws. The limits are what -stop the next ones, and they deserve a word, because a limit that sounds -like belt-and-braces turns out to map onto real advisories with -uncomfortable precision. +stop the next ones, because they are not just belt-and-braces; they +map onto real advisories that we found by analysing the past 3 years of +imaging CVEs. Take a pixel budget. Pillow has had one for years, the decompression-bomb threshold, and it is a global that any library in the process can raise. @@ -195,10 +190,10 @@ We enforce the same number ourselves, from the header, before Pillow is asked. But a pixel budget alone lets through a page a few pixels wide and a million tall, and an abnormally tall TIFF is exactly what one flaw in libtiff's RGBA reader needed to write colour data to an arbitrary address -(CVE-2025-9900). So the policy also holds either side of a page, a frame -or a tile to a ceiling. No scanner writes a side longer than a few tens of -thousands of pixels; the default is three times the longest side of an A3 -page at 600 dpi, and nothing we have scanned comes near it. +(CVE-2025-9900). So the policy also holds both axes of a page, a frame, +or a tile to a ceiling. No scanner writes a width or height longer than +a few tens of thousands of pixels; the default is three times the longest +side of an A3 page at 600 dpi, and nothing we have scanned comes near it. Or take TIFF compression. A scanner writes one of six schemes. libtiff knows nineteen, and most of its security history lives in the other @@ -227,8 +222,8 @@ watch on the decoders]({{< relref ## What it does not do -A security library carries an implied promise, so this has to be said -plainly, and the library's README says it first. +A security library carries an implied promise, so we need to be clear +about the limits of this library. It does not protect against a flaw in the readers you *do* allow. A crafted JPEG that exploits your JPEG decoder is a JPEG of a sensible size,