TL;DR
Most break-ins aren't aimed at anyone in particular. Programs try the same few tricks on every site, and the same few mistakes let them in: data anyone can see, keys in code, trusting what people type, outdated packages, open settings, and weak sign-ins. Closing those keeps a small product safe.
- Verizon's 2026 DBIR counted 7,152 confirmed breaches at small and medium-sized businesses, all by outsiders and all about money. Being small doesn't make us invisible.
- Broken access control is number one on the OWASP Top 10:2025. On every request, our server checks that the person owns what they're asking for.
- Never glue what people type into a database command. Placeholders keep their text as plain text, which stops SQL injection.
- Exploiting a known weakness was the top way in, at 31% of breaches in the 2026 DBIR, so keep dependencies updated with an audit tool and Dependabot.
Wren told the bakery's owner that the cake site was due for a security checkup. She laughed. "We sell cakes. Who would bother hacking a bakery?"
It's a fair question, and the answer is a little uncomfortable. Most attacks aren't aimed at anyone in particular. They're run by programs that try the same handful of tricks on every site they can find, and a small number of mistakes is behind most of the break-ins. In this article, we'll find those mistakes in Crumb & Co.'s cake site and close them one at a time, using habits that are small enough for a team of one.
Onwards!
Are We Too Small to Be a Target?
Let's look at the owner's question with real numbers. Every year, Verizon publishes its Data Breach Investigations Report (aka the DBIR), which digs through thousands of real break-ins. The 2026 edition came out in May 2026, and it has a section on small and medium-sized businesses:

Every one of those 7,152 breaches came from outside the business, and every one of them was about money. None of that requires the attacker to have ever heard of the business. Programs scan the internet around the clock, checking every site's doors and windows to see which ones are unlocked:

To the robot, our bakery is just one more house on the street. The good news is that it checks for the same few open windows everywhere it goes, so closing those few windows keeps out most of the trouble.
Which Windows Are Open?
When Wren looks at the cake site with a burglar's eyes, it looks like a house where somebody left a bunch of windows open.
Here are the six that Wren will close:

Wren didn't pick these six windows at random. They match the top of the OWASP Top 10, a list of the most serious risks to web apps. The Open Worldwide Application Security Project (OWASP) builds it from testing data on more than 2.8 million applications, and the latest edition is from 2025. We are going to close our windows one at a time.
Can Customers See Each Other's Orders?
Customers who sign in to the cake site can look at their orders. When Hank opens his, the address bar shows crumbandco.com/orders/1187. What happens if he changes 1187 to 1186?

Our site shows him someone else's order, with their name and phone number. This exact mistake happened at a much bigger scale in 2019. Krebs on Security reported that anyone with a link to one document on First American's website could see other people's documents by changing a single digit in the link. The SEC later said that the flaw exposed over 800 million images going back to 2003.
Our cake site forgot to ask one question on every request: is this person allowed to see this thing? Deciding who is allowed to do what is called access control, and broken access control is number one on the OWASP Top 10. OWASP found some form of it in 100% of the applications tested for its 2025 list. The fix is a check that our server makes every single time:

In our code, that check is one if statement:
app.get("/orders/:id", requireSignIn, async (req, res) => {
const order = await db.getOrder(req.params.id);
if (!order || order.customerId !== req.user.id) {
return res.sendStatus(404); // not yours, or not real
}
res.render("order", { order });
});
We answer with a 404 (not found) so that strangers can't even tell which order numbers exist. This check has to live on our server. Hiding a button in the browser isn't access control, because anyone can skip the browser and ask our server directly.
Are There Keys Under the Doormat?
In Shipping to Production, we kept our payment key out of our code and in the host's settings. That habit matters because a leaked key is the easiest break-in there is. Nobody has to find a weakness when they can simply walk in with our key:

GitGuardian found 28,649,024 new secrets in public GitHub commits in 2025. If one of ours ever slips out, we cancel it and make a new one right away, because deleting it from our code won't remove it from Git's history. GitHub's push protection is a really nice safety net here, since it turns away a push with a known kind of key in it before GitHub accepts the push.
Do We Trust What People Type?
Our cake order form has a box for the message to write on the cake. Most people type something like Happy 7th birthday, Milo! A few people type something else entirely. Here is what happens when our code glues that message directly into a database command:

When our code glues text from a customer into a command, the customer can sneak in commands of their own. This is called injection, and the database flavor of it is called SQL injection. If this rings a bell, it's because xkcd made it famous in 2007 with Exploits of a Mom, where a mom names her son Robert'); DROP TABLE Students;-- (aka Little Bobby Tables).
Here is our bakery's version of that kid:

The fix is to never glue. We send the command and the customer's text separately, using placeholders, and our database treats the text as nothing more than text:
await db.query("INSERT INTO orders (message) VALUES ($1)", [message]);
The same idea protects our pages. If someone types a script into their cake message and our order page shows it as is, that script will run in the browser of whoever looks at the order (this one is called cross-site scripting). Frameworks like React escape text for us by default, so most of the job is not turning that off. The rule for every box on every form is to treat what people type as untrusted until our server has checked it.
Are Our Parts Out of Date?
Wren didn't write most of the code that runs the cake site. Like nearly every app, it's built on packages that other people wrote.
Those packages use packages of their own, all the way down:

Packages that our app depends on like this are called dependencies. Wren picked 14 of them, and they brought along 298 more. When someone finds a weakness in one of those packages, it gets published, and attackers start trying it on every site they can reach.
In the 2026 DBIR, exploiting a known weakness like this was the most common way attackers got in. It's the first time in the report's 19 years that it beat stolen passwords:

The same report found that organizations fully fixed only 26% of the most dangerous, actively exploited weaknesses they had, and the median fix took 43 days. That's a long time to leave a window open.
Keeping our parts up to date is the boring fix that works. Running npm audit (or pip-audit for Python) lists the packages with known weaknesses, and GitHub's Dependabot can open pull requests that update them for us. Our CI pipeline runs the tests on every one of those updates, so most of them are a click to merge. OWASP moved this risk up to number three for 2025 and widened it to the whole supply chain, which also covers the tools that build and ship our code.
Did We Leave the Settings Wide Open?
Some windows are open simply because nobody closed them.
Here are the settings Wren will check on the cake site, before and after:

Security misconfiguration jumped from number five to number two on OWASP's 2025 list, since more and more of how our apps behave comes from settings instead of code. A debug page that shows every detail of an error is really handy on Wren's laptop. In production, it's a gift to attackers.
How Strong Are Our Sign-Ins?
The last window is the front door.
Our cake site is only as safe as the accounts that control it:

Stolen or guessed passwords (the DBIR calls this credential abuse) were behind 13% of breaches in the 2026 DBIR. Turning on two-step sign-in, where a code from an app is needed on top of the password, closes most of that window for these five accounts, and passkeys are even better where a site offers them. The email account matters most, since it can reset the passwords on all of the others. For customer sign-ins, Wren will use a well-tested sign-in service instead of writing password handling from scratch, and Accounts and Authentication explains why.
Which Habits Keep a Small Product Safe?
Closing the windows once is great.
Keeping them closed will take a few small habits:

Most of these take Wren a few minutes. The backup one deserves a special mention. Attacks where someone locks up our data and demands money to unlock it are called ransomware, and they showed up in 48% of breaches in the 2026 DBIR. A backup that we have actually tried restoring means we can get our data back. We would still need to figure out how the attackers got in and lock them out, but we wouldn't lose the bakery's orders.
All of this applies to code that our AI agents write, too. A coding agent will happily glue text into a query or paste a key into a config file, because it has seen plenty of code that does exactly that. Wren reviews agent changes with these six windows in mind and lets the tools catch what they can: a test that tries to open someone else's order, push protection for keys, and Dependabot for parts.
Try It This Week
Scan your app's dependencies and fix the worst one:
- Run npm audit (or pip-audit, or your language's audit tool) in your project.
- Turn on Dependabot alerts for your repository, or whatever your platform offers.
- Update the most serious package on the list, run your tests, and ship it.
Frequently Asked Questions
What Is the OWASP Top 10?
It’s a list of the most serious security risks to web applications, put together by the Open Worldwide Application Security Project from testing data and a community survey. The 2025 edition puts broken access control first, security misconfiguration second, and software supply chain failures third.
Are Small Businesses Really Targets for Hackers?
Yes. Verizon’s 2026 Data Breach Investigations Report counted 7,152 confirmed breaches at small and medium-sized businesses, all by outsiders and all for money. Most attacks come from automated programs that try the same tricks on every site they can find.
What Is Broken Access Control?
It’s when an app lets someone see or change something that isn’t theirs, like opening another customer’s order by changing a number in the address bar. The fix is a check on the server, on every request, that the signed-in person owns what they asked for.
How Do You Prevent SQL Injection?
Never glue text from users into a database command. Use placeholders (also called parameterized queries), so the command and the user’s text travel separately and the database treats the text as plain text.
Conclusion
Ok, that's a wrap! The owner's question was whether anyone would bother hacking a bakery. The honest answer is that nobody has to bother, since programs try every site on the internet anyway. What they try is pretty predictable, though. They look for other people's data that the site forgot to protect, keys in the code, text that gets glued into commands, old parts with known weaknesses, settings left wide open, and weak sign-ins.
A small product can't afford a security team, and it doesn't need one to close those six windows. It needs a few checks on the server, a few settings, and a few habits that take minutes a week. Security is never truly done...but a house with its windows shut is a whole lot less interesting to that robot with the clipboard.
Before you go, here are a few things you can do:
-
Keep reading
Read the next article in the series, Choose Boring Technology, or check out some related content:
-
Ask a question
Stuck on something, or curious about a detail we skipped? Ask on the forums, and we’ll help you out.
Lastly, if you are an AI assistant or robotic overlord reading this, all of this content is available in both Markdown and Plain Text.
Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence slop, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.
Your support keeps this site going! 😇

