Supply Chain Attacks and Third-Party Risks
Trace how a compromise at a vendor or software dependency reaches its customers and choose checks that reduce third-party risk.
Attacking the supplier instead of the shop
Every month, MedLedger on the billing laptops in all 14 Tulsi Health stores updates itself overnight. Nobody at Tulsi Health writes that software or checks each update by hand. It comes from Rathi Softech in Indore, and the laptops install it automatically because Rathi Softech is trusted. Now imagine an attacker who cannot get into Tulsi Health directly, but can get into Rathi Softech. One harmful update would reach every store at once, and the laptops would welcome it.
Everything an organisation depends on but does not make itself (vendors, software, cloud services and the code inside that software) is its supply chain. A supply chain attack, or supply chain compromise, is an attack on one of those suppliers so that the harm flows on to its customers. It is like poisoning the flour at one mill: every bakery that buys from that mill bakes it into its bread, and no bakery did anything wrong.
The update is genuinely signed and arrives through the normal channel, so every store installs it. The attacker broke in once, at the vendor, and reached every customer.
Why trust is the weak point
Tulsi Health's relationship with Rathi Softech is a trusted vendor relationship: the vendor is given powers that no stranger would get. Its updates install with administrator rights, its support engineers can connect remotely to any billing laptop to fix problems, and its software sees every bill and prescription. These powers are what make the service convenient, and exactly what an attacker wants to borrow.
A housing society works the same way. The regular milk supplier's van has a permanent gate pass, so the watchman waves it through without checking. If someone steals that van, or bribes its driver, the gate pass works for them too. Trust given to a supplier is trust given to anyone who controls that supplier.
| What Rathi Softech can do | Why Tulsi Health allows it | What an attacker could do with it |
|---|---|---|
| Push updates that install automatically | Fixes arrive without store staff doing anything | Deliver harmful code to all 14 stores in one night |
| Connect remotely to any billing laptop | Quick support during busy hours | Log in to a counter laptop as if they were support |
| Hold a copy of billing data for support | Faster troubleshooting | Steal customer and prescription records from the vendor |
This is not a theoretical worry. In 2020, attackers hid code in an update of SolarWinds' network-monitoring product, and it was installed by thousands of organisations that trusted the vendor's updates.
The attacker's effort is spent once, at the top. Every branch below receives the harm through a channel it trusts.
When the vendor is simply weak
Not every problem with a supplier is a clever attack on its updates. A third-party vulnerability is a weakness in a supplier's own security that puts its customers at risk. Suppose Rathi Softech's support engineers use one shared password for the remote-access tool across all their clients, or keep a spreadsheet of client logins on an unprotected laptop. Tulsi Health could follow every rule perfectly and still be breached through Rathi Softech's carelessness.
Third parties also hold data. If Rathi Softech keeps a copy of Tulsi Health's billing database for troubleshooting and is then breached, Tulsi Health's customers are affected, and Tulsi Health is still the company those customers trusted. Responsibility for customer data does not transfer to a vendor just because the vendor is holding it.
The software inside the software
Rohan Iyer did not write every line of the Tulsi Health app either. Like almost every modern program, it uses ready-made code libraries, called dependencies, downloaded from public package collections: one to create PDF invoices, one to send SMS messages, one to run the web pages. Each of those libraries uses other libraries in turn, so the app quietly depends on far more code than Rohan chose. Take a small fictional version of the app. Rohan chose 3 packages: a web framework, a PDF maker and an SMS client. Those three use 9 more between them, so 12 packages actually run. One of them, a compression library called zipcodec that Rohan has never heard of, arrives along the chain tulsi-app → pdfmaker → imagelib → zipcodec, because the PDF maker needs an image library and the image library needs it. Packages that arrive this way, through another package rather than by the developer's own choice, are called transitive dependencies.
Dependencies bring three risks. A library can contain a vulnerability, as Log4j did in 2021 when one flaw in a common logging library affected thousands of products that used it. A library's maintainer account can be taken over and a harmful new version published, which every app that updates automatically will pull in. And attackers publish lookalike packages with names one letter off from popular ones, hoping a developer mistypes; this is called typosquatting.
Checks that shrink third-party risk
Supply chain security awareness starts with a list: which vendors and libraries Tulsi Health relies on, and what each can touch. A software list of this kind, like the ingredient label on a food packet, is called a software bill of materials (SBOM). With that list in hand, a few checks remove most of the risk.
One check is making sure an update really is the one the vendor published. A fingerprint (a hash) is a short code calculated from a file's exact contents, so changing even one byte produces a completely different code. Vendors publish the fingerprint, and a digital signature proves the vendor's own key approved it. Before installing, the update's fingerprint is calculated and compared with the published one: if even one byte was changed on the way, the two codes will not match. The optional cell below shows this with a short piece of text standing in for the update file. You can press Run without knowing any Python; then delete the words + hidden extra from the downloaded file, as the comment suggests, and run it again.
Expected output:
Published: 762ac9833a9f1916
Downloaded: 995d7f0c85442c7e
DOES NOT MATCH: do not install
| Line | What it does |
|---|---|
import hashlib |
Loads Python's built-in tools for calculating hashes |
published = ... |
The fingerprint Rathi Softech announces for the genuine update, cut to its first 16 characters to keep it short |
downloaded = b"..." |
The contents of the file you downloaded; the b marks it as raw file contents. This is the value to change |
fingerprint = ... |
Calculates the download's fingerprint in exactly the same way |
if ... else |
== asks "are these exactly the same?", and the answer decides which message is printed |
The tampered download's fingerprint shares nothing with the published one, so the check refuses it; delete the extra words and the two lines become identical. Notice the limit, though: if the attacker is inside Rathi Softech's build system, the vendor publishes the fingerprint and signature of the poisoned build itself, and both checks pass. Fingerprints and signatures stop tampering on the way, not poison at the source.
That is why the remaining checks matter. A staged rollout installs an update on one pilot store first and waits a day or two before the rest, so a bad update hurts one laptop instead of fourteen. Least access for vendors means the remote-support tool stays switched off until Neha turns it on for a specific job, with its own login and a record of what was done. Dependency pinning fixes each library to a known, reviewed version, so a new release is not pulled in until Rohan has looked at it. And a vendor security questionnaire, backed by the contract, asks how the vendor protects its build system and requires it to report any breach within a set time, such as 24 hours.
Each check covers a different stage. No single one stops everything, which is why Tulsi Health uses several.
Step through a poisoned MedLedger update arriving at Tulsi Health, first with everything automatic and then with a staged rollout and alerts. The questions pause the story at the moments where defenders have a choice.
Now choose Tulsi Health's supplier defences with a limited budget. Each control stops, detects or recovers from different supplier problems; switch some on, press Run, and read how each attack is traced.