Summary

  • W3C's 24 September 2026 YAML-LD 1.0 Working Draft now spells out two parser hazards in its non-normative security section: alias expansion can multiply a small input into a large tree, and some tag constructors can execute code.
  • Neither hazard is new. RFC 9512 flagged both in February 2024; the 20 September YAML-LD draft had not yet said so in its own security section.
  • YAML-LD's conformance rules govern meaning, not memory. They certify that data maps to JSON-LD, not that the parser which built it was configured safely.

A four-kilobyte YAML-LD file can walk into your pipeline, pass every semantic test you own, and still cost you a gigabyte of memory before your application reads a single triple. That is not a defect in the file. It is the bill for confusing a data format with the machine that parses it.

The W3C JSON-LD Working Group's 24 September 2026 YAML-LD 1.0 Working Draft now says this out loud. Its non-normative security section points directly at RFC 9512 and names two mechanisms by which a compact document becomes an expensive one: alias expansion, which can blow a small, even acyclic YAML graph into a far larger JSON-LD tree, and tag constructors, which in some parsers will execute code — !!python/object being the example everyone reaches for. The 20 September predecessor had gestured vaguely at JSON-LD security and the +yaml suffix. This one names the problem.

Naming it is not discovering it. RFC 9512, the IETF Informational document that registered the YAML media type and its structured suffix back in February 2024, had already covered resource exhaustion and arbitrary code execution. What changed is that the format's own specification now carries the warning instead of leaving it in a media-type registry footnote. No compromised deployment is reported, no failure rate is measured, no parser configuration is certified. And a Working Draft is a working draft: publication implies no endorsement by W3C or its members.

Alias expansion: a small file, a much larger tree

The spec's core promise is narrow and genuinely useful: linked data written in YAML should be expressible as JSON-LD without losing semantic information. Anchors and aliases are how YAML lets a writer define something once and reference it repeatedly, and the draft permits them in the serialization while prohibiting cycles in the representation graph. Each alias reference is treated as a copy when the JSON-LD internal representation is constructed, and the anchor names themselves are not preserved as semantic data.

Which is precisely the trap. The mechanism that saves a human from typing the same block five times also lets a machine build five copies — or five million — from a document that fits in a tweet. Acyclic does not mean bounded. The graph has no loop; the constructor still has work to do, and nobody in the specification has promised to cap it.

Tag constructors: code that runs before your data rules do

YAML tags are where a document stops describing data and starts invoking behaviour. Some parsers honour tags that construct language-native objects, and !!python/object is the canonical illustration of what that costs when the input is untrusted. The draft does not mandate a safe mode. It points at the hazard and moves on — the correct scope for a format specification, and a poor substitute for a deployment decision.

What conformance actually certifies

The normative requirements are firm and worth stating plainly: UTF-8, a processor compatible with YAML 1.2 or later, string mapping keys, and satisfaction of the identified test suites. The draft's account of older YAML 1.1 parsing also explains why words such as no and on get misread as booleans by libraries that never agreed on the same rules. All of it defines what a conforming YAML-LD result means. None of it sets your memory ceiling, picks a tag-construction mode, or draws the boundary around untrusted input. Section 6 says so itself: non-normative.

Who signs off on the parser

So the governance question for a buyer or a data publisher is not whether one standards badge can cover every property. It is who owns the cost and behaviour of the parser standing between the wire and the semantics. A sane acceptance record names the parser version and mode, the permitted tags, an alias-expansion budget, the treatment of untrusted files, and the tests run at that boundary. That is Daniel Kade's operating proposal, not a checklist the Working Draft mandates.

A successful JSON-LD conversion proves something real about what the data means. It proves nothing about whether executing the conversion was safe. Borrowing the first as evidence of the second is how a tidy conformance sign-off becomes an incident report.

Sources