Security Engineering

The Dependencies You Did Not Choose

Marcus ChenMarcus ChenCo-founder & CTO23 Dec 20214 min read6740 views
Editorial cover for “The Dependencies You Did Not Choose”

A logging library that most organizations have never heard of, do not license, did not install, and cannot find turned out to be inside a very large fraction of the software they run. Then a trivially exploitable flaw in it was published, ten days before Christmas.

We ran an emergency briefing on four days' notice and spent the following week on the phones. This is what the fortnight taught us, written down for the next time — and there will be a next time, because the underlying condition has not changed.

The actual hard part was not patching

The vulnerability itself is straightforward to understand and, where you control the code, straightforward to fix: update the library, or set the flag, or remove the class.

The hard part was the question that came first, and for most organizations took days to answer: where is it?

The library ships inside other software. It is bundled into applications by vendors, packed into container images by build pipelines, pulled in transitively by dependencies that pulled it in from dependencies. It appears in appliances whose vendors did not publish an inventory. It sits inside a Java application that a department bought in 2016 and nobody in IT remembers.

Scanning helps and is not sufficient. Scanners find what is on disk in a recognisable form; they do not reliably find a copy repackaged inside a fat archive, or a running process loading it from a path nobody indexed. Every honest engineer we spoke to that week described the same sequence: scan, find some, ask vendors, find more, get an unexpected answer from a business unit, find more.

What worked

Three approaches did most of the useful work, in this order.

Ask the vendors, in writing, with a deadline. Most major vendors published advisories within days listing affected products. The task is to enumerate your software and check each one, which is tedious and entirely mechanical. Organizations with a current software inventory finished this in a day. Organizations without one spent the week building the inventory they should have had, under time pressure, which is the expensive way to acquire it.

Look at the network, not just the disk. The exploitation pattern involves the vulnerable application making an outbound connection to an attacker-controlled destination. That means egress filtering and DNS logging were doing double duty: blocking exploitation for systems that had no business reaching the internet, and revealing vulnerable systems that tried. Several clients found affected applications they had not identified by disk scanning because those applications generated outbound lookups during a test.

If you take one architectural lesson from this: servers should not have unrestricted outbound internet access. It is a control that pays out during a category of incident you cannot predict in advance.

Prioritise by exposure, not by count. Internet-facing first, then systems handling untrusted input, then everything else. The vulnerability requires attacker-controlled data to reach the logging call. An internal batch job that only logs its own configuration is a genuine finding and a very different priority from a public web application logging user-supplied headers.

What we got wrong

Two things, and they are worth stating plainly because we said them to clients at the time.

We initially over-indexed on scanning and under-indexed on vendor advisories, which cost us most of a day. The scanners were the exciting new capability; the boring spreadsheet of "what software do we run" was what actually produced answers.

And our first round of guidance treated the flag-based mitigation as roughly equivalent to upgrading. Subsequent findings narrowed the conditions under which the mitigation held, and we had to go back to clients and revise. That is the correct thing to do, and it was still uncomfortable. During a fast-moving disclosure, advice should carry an explicit shelf life.

The condition that has not changed

Modern software is assembled, not written. A typical application's dependency tree is hundreds of packages deep, most of them maintained by volunteers, most of them pulled in by something else. This is not a scandal — it is how anything gets built in a reasonable timeframe — but it means "what are we running" is a question about a graph, not a list.

Two habits make the next one survivable:

Produce and keep a software bill of materials for anything you build. Not because a document is inherently valuable, but because it converts a week of archaeology into a query. Modern build tooling generates this with a flag.

Maintain a real inventory of purchased software, with versions and owners. Unfashionable, unautomatable in parts, and the single highest-leverage artefact we saw during this event.

A word about the people who maintain it

The library at the centre of this was maintained by a small number of unpaid volunteers, who spent the week shipping fixes at speed while receiving abuse from strangers whose commercial products depended on their work.

There is a structural problem there, and it is not solved by better scanning. If your organization's revenue depends on open source — and it does — the proportionate responses are to contribute, to fund, or at minimum to be civil. It is the cheapest supply chain security investment available.

For the holidays

Our advice to clients heading into the break was short: know your internet-facing Java estate, restrict server egress, keep somebody on call who can act rather than escalate, and accept that the inventory work you skipped in the calm months is the work you are doing now.

The library was published in 2001. The flaw was reported in November. The exploitation began within hours of disclosure. The gap that matters is not between disclosure and patch — it is between "we run software" and "we know what our software is made of".

#Log4Shell#software supply chain#SBOM#egress#inventory
Marcus Chen

About the author

Marcus ChenCo-founder & CTO

Marcus built and ran a 24/7 security operations center for a national healthcare network, where he learned that detection engineering is a craft and alert fatigue is a choice. A GCIH and GCDA holder with a background in distributed systems, he architected the Secuxper sensor pipeline — rebuilt from scratch in 2024 with staged rollout and a kill switch, after the industry spent a summer learning what fragile agents cost — and it now processes 400M+ events a day. He co-founded the company with Elena in 2020 on a simple bet: a SOC built by people who have lived through 3 a.m. incidents will always beat one built from a spec sheet.

Detection engineeringSOC architectureData pipelinesML in security operations

Discussion(2)

  • RE

    Ruth Elleryalmost 5 years ago

    The vendor-advisory-before-scanning point saved us about two days. We are a school district with one and a half IT people and the spreadsheet approach was the only one that finished.

  • DO

    Daniel Okonkwoalmost 5 years ago

    Appreciate you publishing the correction on the mitigation rather than quietly editing the post. Rare.

Join the discussion

Your email stays private; we only use it to distinguish real readers from bots.

open a channel

The best time to harden your defenses was yesterday.

The second-best time is right now. Tell us what keeps you up at night — we answer within one business day.