Case Study: Verifying Security Fixes Instead of Trusting Them
The Nginx module had several security flaws, including cross-boundary session reuse that allowed a low-trust session to be accepted in a high-trust area, and request smuggling via an undischarged body. An attacker could escalate privileges or smuggle requests when the module is behind a proxy.
Published on medium.com
A client maintained an open-source Nginx module that implements passwordless authentication using OpenPGP signatures. Visitors sign a server-issued challenge with their private key instead of using a password.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
A client maintained an open-source Nginx module that implements passwordless authentication using OpenPGP signatures. Visitors sign a server-issued challenge with their private key instead of using a password. The module handles session issuance, replay protection, per-IP rate limiting, and revocation checking, all in C, running inside the Nginx worker process.
The maintainer had already run two internal security self-audits and commissioned an external code-level review. By the time CyBax was engaged, the module had been through several rounds of fixes. The ask was not to find new bugs. The ask was to prove the existing fixes actually worked. That distinction shaped the whole engagement.
Setup
Most security reports stop at the diff. A finding gets described, a patch gets proposed or applied, and the report says "fixed" based on reading the code. That step is necessary, not sufficient. A patch can look correct on the page and still fail at runtime. A config directive might not propagate the way the code assumes. A test suite might not exercise the edge case that matters. A build step might quietly do something different from what its own comments claim.
The CyBax approach on this engagement treated every "fixed" claim as something to test, not something to record.
Every finding was checked against the live repository state, not a summary of it. Every fix was built from source on the exact base images and dependency versions the fix specified, instead of assuming those versions were correct. The compiled binary was run against real traffic patterns, including the specific attack each finding described. Where possible, the underlying fault condition was reproduced directly, not just checked for the presence of a code path meant to handle it. Static and dynamic analysis ran on top of manual review. gcc -fanalyzer, cppcheck, AddressSanitizer, UndefinedBehaviorSanitizer, and the project's own fuzz harnesses all ran fresh against each candidate fix.
Several findings in this engagement were the kind of subtle, once-per-thousand-requests logic errors a human misses reading a diff and a sanitizer catches immediately.
Finding it
The engagement covered two categories. One was application logic in the authentication module itself. The other was security of the build and release pipeline that packaged it. Below are samples from each, described generically to avoid identifying the project.
Application logic
Cross-boundary session reuse. The module supported multiple independent trust domains on one server. Think of a partner-facing area and an admin area, each trusting a different set of signing keys. Sessions were validated on every request by a cryptographic MAC, an expiry check, and a revocation check. The keyring a session was issued under was checked only at login and never again after that. Two locations could share a session secret, a documented and intentional configuration, while trusting different keyrings. They would accept each other's sessions without anyone noticing. A user who could authenticate in the low-trust area could present that same session cookie in the high-trust area and get admitted without ever appearing in its keyring.
Request smuggling through an undischarged body. A response generated early in the request lifecycle, before authentication was even evaluated, never read the incoming request body first. Nginx's own contract for that situation calls for the body to be explicitly discarded. The module didn't do that. The unread bytes sat in the connection buffer and got parsed as a second, pipelined request on the same keepalive connection. This is a textbook request-smuggling primitive when the module sits behind a reverse proxy or CDN, which is exactly the deployment model it targets.
Weak identity extraction on a fallback path. The module pulled the signer's cryptographic fingerprint from the verification tool's structured output. The primary extraction path checked that the value was actually a hex fingerprint of the right length. A secondary fallback path, kept for compatibility with older verification-tool versions, checked only the length and not the content. A long enough non-hex value would get accepted as an identity and written into a session cookie, a structured log line, and a revocation comparison. Unvalidated subprocess output reaching a response header is a header-injection primitive. This wasn't exploitable against a standard, correctly behaving verification binary, but it was a real gap between two paths that should have enforced the same rule.
Anti-automation throttle gaps, found across two review cycles. The module banned an IP address after a threshold of failed login attempts. The first finding involved two of the cheapest failure paths to automate. One was an unreadable request body. The other failed a structural pre-check before verification even ran. Both bypassed the counter entirely, so a client could hammer the login endpoint indefinitely and never trigger the ban. The second finding turned up a review cycle later, once that fix was itself scrutinized. The corrected logic had overshot in the other direction. It now counted the module's own internal faults, a failed subprocess fork or an exhausted memory pool, as if they were failed login attempts. A transient infrastructure hiccup could lock out every legitimate user for the full ban duration.
Build and release pipeline
Signing key exposed to full network access. The container responsible for signing the project's package repository had the private signing key mounted for its entire runtime. That same container ran package-manager commands requiring full internet access for the whole time the plaintext key was present. This is the same failure shape behind at least one real-world supply-chain compromise of a widely used CI tool.
Unpinned upstream dependencies. Base container images were referenced by mutable tag rather than an immutable content digest. Anyone with push access to the upstream image, or a compromised upstream account, could silently change what the next build pulled in, with no corresponding change visible in the project's own files.
Unverified third-party source download. The build process fetched a compressed source archive from an upstream project's official site over TLS, with no integrity check against that project's own published signatures. TLS protected the transfer but not against a compromised origin server or a tampered release artifact. This is the same mechanism behind a well-known backdoor incident in widely used compression tooling.
Exploitation
Step 1: Cross-boundary session reuse
A session was minted in one trust domain and presented in the other. The session was rejected after the fix. Before the fix, the escalation worked.
Step 2: Request smuggling through an undischarged body
A raw TCP socket sent one request whose body was itself a well-formed HTTP request, then counted response lines. Two responses came back on the unfixed build. One came back after the fix.
Step 3: Weak identity extraction on a fallback path
A stand-in verification binary was built to emit exactly the malformed output: a long enough non-hex value in place of a fingerprint. The exploit worked before the fix and failed after it, in an isolated test run.
Step 4: Anti-automation throttle gaps
The first finding was verified by hammering the login endpoint through the two cheap failure paths, an unreadable request body and a request that failed the structural pre-check, and confirming the ban never triggered.
The second finding was verified live by forcing a genuine internal fault, an environment misconfiguration that reliably breaks a subprocess call, and confirming the client was never throttled across repeated attempts past the ban threshold. A real bad login attempt, run as a control on an identical instance, was banned exactly as configured.
Step 5: Signing key exposed to full network access
The actual signing container was built and network reachability tested directly. Before the fix, DNS resolution and outbound connections succeeded the whole time. After the fix split the process into a network-enabled prep stage with no key present and a network-isolated signing stage, both failed outright during signing. Every tool the signing step needed still worked with no network at all.
Step 6: Unpinned upstream dependencies
The fix was verified by cross-checking the pinned values against what those tags currently resolve to on the public registry, and by building successfully from the pinned images directly.
Step 7: Unverified third-party source download
The fix was verified by downloading the real archive fresh and confirming the hash matched, then deliberately corrupting a copy and confirming the build refused it.
Root cause
Cross-boundary session reuse. The keyring a session was issued under was checked only at login and never again after that. Two locations could share a session secret, a documented and intentional configuration, while trusting different keyrings, so each accepted the other's sessions. The MAC, expiry and revocation checks all passed because they did not bind the session to the keyring that issued it.
Request smuggling. A response generated early in the request lifecycle, before authentication was evaluated, never read the incoming request body first. Nginx's contract for that situation calls for the body to be explicitly discarded, and the module didn't do that. The unread bytes sat in the connection buffer and were parsed as a second, pipelined request on the same keepalive connection.
Weak identity extraction. The primary extraction path checked that the value was a hex fingerprint of the right length. The secondary fallback path, kept for compatibility with older verification-tool versions, checked only the length and not the content. Two paths that should have enforced the same rule did not.
Throttle gaps. The first version of the counter was bypassed by two of the cheapest failure paths to automate: an unreadable request body, and a request that failed a structural pre-check before verification even ran. The corrected logic overshot in the other direction and counted the module's own internal faults, a failed subprocess fork or an exhausted memory pool, as failed login attempts.
Signing key exposure. The container responsible for signing the package repository had the private signing key mounted for its entire runtime, and ran package-manager commands requiring full internet access for the whole time the plaintext key was present.
Unpinned dependencies. Base container images were referenced by mutable tag rather than an immutable content digest, so anyone with push access to the upstream image, or a compromised upstream account, could silently change what the next build pulled in, with no corresponding change visible in the project's own files.
Unverified download. The build fetched a compressed source archive from an upstream project's official site over TLS with no integrity check against that project's own published signatures.
Impact
Across the engagement, multiple authentication-bypass and session-integrity findings, all rated Critical or High, were closed and independently reproduced before and after the fix. A request-smuggling primitive was closed and reproduced with raw-socket testing. Supply-chain and build-pipeline hardening was applied and verified against live infrastructure. A pair of related throttling logic errors was caught a full review cycle apart, each verified with targeted fault injection rather than code inspection alone.
The cross-boundary session reuse let a user who could authenticate in the low-trust area present that same session cookie in the high-trust area and get admitted without ever appearing in its keyring. The request-smuggling primitive is a textbook one when the module sits behind a reverse proxy or CDN, which is exactly the deployment model it targets. The weak identity extraction was not exploitable against a standard, correctly behaving verification binary, but unvalidated subprocess output reaching a response header is a header-injection primitive. The first throttle gap let a client hammer the login endpoint indefinitely and never trigger the ban. The second meant a transient infrastructure hiccup could lock out every legitimate user for the full ban duration. On the pipeline side, the signing key was exposed to full network access for its entire runtime, upstream images could be changed silently, and a tampered release artifact would have been accepted.
Fix
Cross-boundary session reuse. The session was rejected after the fix. The session was rejected after the fix.
Request smuggling. One response came back after the fix. One response came back after the fix.
Weak identity extraction. The exploit failed after the fix. The exploit failed after the fix.
Throttle gaps. The corrected logic no longer counted the module's own internal faults as failed login attempts.
Signing key exposure. After the fix split the process into a network-enabled prep stage with no key present and a network-isolated signing stage, both failed outright during signing. DNS resolution and outbound connections failed outright during signing, and every tool the signing step needed still worked with no network at all.
Unpinned dependencies. This was fixed by pinning to specific digests.
Unverified download. It was fixed with a checksum gate against independently verified hash values. It was verified by deliberately corrupting a copy and confirming the build refused it.
Variants to test
- Session binding across trust domains. On any module that supports multiple trust domains sharing a session secret, mint a session in the low-trust domain and present it in the high-trust one. A positive result is admission without the signer appearing in the high-trust keyring.
- Early responses with a body. Send a request whose body is itself a well-formed HTTP request to any endpoint that can respond before reading the body, over a keepalive connection. A positive result is two response lines on the wire.
- Fallback parsing paths. Compare every fallback parser against its primary path with a stand-in binary that emits malformed but correctly sized output. A positive result is the malformed value reaching a cookie, log line or header.
- Throttle bypass via cheap failures. Drive the login endpoint through unreadable bodies and structural pre-check failures past the ban threshold. A positive result is no ban, with a real bad login on an identical instance banned as a control.
- Throttle false positives via internal faults. Force a subprocess failure or memory exhaustion and confirm whether legitimate clients get banned. A positive result is a lockout caused by infrastructure, not by credentials.
- Signing containers. Build the signing container and test DNS resolution and outbound connections while the key is present. A positive result is reachability during signing.
- Mutable base images. Check whether base images are referenced by tag or digest, and whether the digest matches what the tag currently resolves to. A positive result is a tag that can change without a change in the project's files.
- Unverified downloads. Corrupt a copy of a downloaded archive and confirm the build refuses it. A positive result is a build that proceeds with the corrupted artifact.
What happened, in plain words
A company called CyBax Solutions was hired to look at a piece of software that lets people log in without a password. Instead of typing a password, a visitor proves who they are by signing a short piece of text that the server hands them, using a secret key that only they hold. The software that checks these signatures is an add-on (a "module") for Nginx, a very common web server program. It is written in C, a programming language used for software that needs to be fast and close to the machine.
The person who maintains this software had already done a lot of work on security. They had run two security checks on their own code, and they had paid someone else to read the code and look for problems. By the time CyBax arrived, the software had already been through several rounds of repairs, called "fixes".
The client did not ask for new problems to be found. The client asked for something different and, in some ways, harder: prove that the fixes that had already been made actually work. That is the whole theme of this engagement. A fix can look perfect when you read it and still fail when the program actually runs. So CyBax tested every fix by running the software and attacking it, rather than by reading the change and trusting it.
This article walks through what they found, how they proved each fix worked, and what it all means. Every technical idea is explained from scratch, so you do not need any security background to follow it.
The situation
What the software does
A web server is a program that sits on a computer connected to the internet and answers requests from browsers. When you visit a website, your browser sends a request to a web server, and the server sends back a page.
Nginx is one of the most widely used web servers in the world. It can be extended with modules: extra pieces of code that plug into it and add features. The module in this engagement adds a login system to Nginx.
Most login systems work like this: you type a username and a password, the server checks them against a stored copy, and if they match you get in. This module does something different, called passwordless authentication. Here is the idea in everyday terms:
- You ask the server to let you in.
- The server sends back a random piece of text, called a challenge. Think of it as a numbered ticket the server just tore off a roll.
- Your computer uses a private key, a secret file that only you have, to sign that challenge. A signature is a mathematical stamp that proves the challenge came from whoever holds the key, and that the challenge has not been altered.
- You send the signature back. The server checks it against your public key, which is the matching public half of your key pair that anyone can see, and if it is valid, you are logged in.
This scheme is built on OpenPGP, a well-known standard for encrypting and signing data. The important part for a beginner is this: the private key never leaves your computer, and the server never sees a password. That is the appeal.
The jobs the module has to do
Once you are logged in, the server needs to remember you between requests. Browsers and servers do this with a session: the server gives your browser a small piece of data, usually stored in a cookie (a small file the browser keeps for a site and sends back with every request), and the server uses it to recognise you on the next request. The module handles several jobs around this:
- Session issuance: creating that session and handing it to your browser.
- Replay protection: making sure an old signed challenge cannot be reused by someone who copied it. A replay is when an attacker records a valid message and sends it again later to pretend to be you.
- Per-IP rate limiting: counting failed login attempts per IP address (the numeric address that identifies a computer on the internet) and banning an address that tries too many times. This is anti-automation: it makes it expensive for a program to guess or hammer the login page.
- Revocation checking: checking whether a key has been cancelled or withdrawn, so a stolen key can be shut off.
All of this is written in C and runs inside the Nginx worker process, which is the part of Nginx that actually handles requests. Code that runs there has to be careful, because a mistake can affect the whole server.
Why the client asked for verification, not review
By the time CyBax was engaged, the module had already been through several rounds of fixes. The client's request was specific: do not hunt for new bugs, prove the existing fixes actually work.
That sounds like a small difference. It is not. Reading a fix tells you what the author intended. Running the software tells you what actually happens. A fix can be correct on paper and wrong in practice for reasons that have nothing to do with the author's skill: a setting might not travel where the code assumes it does, a test might not cover the exact situation that matters, or a build step might quietly do something different from what its own comments claim. Verification means checking the behaviour, not the intention.
Why verification is different from review
Most security reports stop at the diff. A diff is the list of lines that changed between two versions of a file, the before-and-after that a fix produces. The usual pattern is: someone describes a problem, someone proposes or applies a patch (a small change meant to fix it), and the report says "fixed" because the code looks right.
That step is necessary, but it is not enough. Here is why, in everyday terms. Imagine a plumber fixes a leak and you inspect the new pipe. It looks well fitted. That does not prove the leak is gone; you have to turn the water on. Software is the same. A patch can look correct on the page and still fail at runtime, when the program is actually running.
There are several ways a fix can look right and still fail:
- A configuration directive (a setting in a config file) might not propagate the way the code assumes. Settings are read in one place and used in another, and the value might not arrive where it is needed.
- A test suite (a set of automated checks) might not exercise the edge case that matters. Tests only prove what they actually test.
- A build step (the process that turns source code into a runnable program) might quietly do something different from what its own comments claim.
So CyBax treated every "fixed" claim as something to test, not something to record. Concretely, that meant:
- Every finding was checked against the live repository state, the actual current files, not a summary of them. A summary can be out of date or optimistic.
- Every fix was built from source on the exact base images and dependency versions the fix specified. A base image is the starting container a build runs in; a dependency is another piece of software your code relies on. Assuming those versions were correct would defeat the point, so they were used exactly as stated.
- The compiled binary (the finished program produced by the build) was run against real traffic patterns, including the specific attack each finding described. Testing the actual attack is the only way to know the attack is really stopped.
- Where possible, the underlying fault condition was reproduced directly, not just checked for the presence of a code path meant to handle it. In other words: cause the bad situation and watch what happens, rather than looking for the line of code that is supposed to deal with it.
On top of manual review, they ran static and dynamic analysis. Static analysis means tools that read the code without running it and flag suspicious patterns. Dynamic analysis means tools that watch the program while it runs. The specific tools were:
gcc -fanalyzer, a checking mode built into the GCC C compiler.cppcheck, a separate static analyser for C and C++.- AddressSanitizer, a tool that catches memory errors such as reading or writing outside the intended area while the program runs.
- UndefinedBehaviorSanitizer, a tool that catches operations whose result the C language does not define, which are a common source of bugs.
- The project's own fuzz harnesses. Fuzzing means feeding a program large amounts of random or malformed input to see if it crashes or misbehaves; a harness is the setup that does the feeding.
All of these ran fresh against each candidate fix. The point of running them fresh, rather than trusting earlier runs, is that a fix changes the code, and a change can introduce a new problem even while solving the old one.
Several findings in this engagement were the kind of subtle logic error that happens roughly once in a thousand requests. A human reading a diff will miss that; a sanitizer, watching the program run, catches it immediately.
Representative findings
The engagement covered two categories of problem:
- Application logic in the authentication module itself, meaning mistakes in how the login feature behaves.
- Security of the build and release pipeline that packaged it, meaning the process that turns the code into something people download and install.
The second category surprises beginners. Why care about the build? Because if an attacker can tamper with how software is built or packaged, they can insert their own code into the final product, and no amount of correct application logic will save you. The samples below are described generically to avoid identifying the project.
Application logic
Cross-boundary session reuse
The module supported multiple independent trust domains on one server. A trust domain is a separate area of the site that trusts its own set of signing keys. Think of a partner-facing area and an admin area: the partner area trusts partner keys, the admin area trusts admin keys, and they are meant to be separate worlds.
Sessions were validated on every request by three checks:
- a cryptographic MAC, which stands for message authentication code: a short value computed with a secret that proves the session data has not been altered;
- an expiry check, confirming the session is still valid time-wise;
- a revocation check, confirming the key behind the session has not been cancelled.
The keyring a session was issued under, meaning the set of keys that domain trusts, was checked only at login and never again after that. That is the flaw. Once you were in, nobody asked which world you came from.
Two locations could share a session secret, a documented and intentional configuration, while trusting different keyrings. Sharing the secret is fine on its own; the problem is that sharing it while trusting different keys means each area will accept the other's sessions without anyone noticing. A user who could authenticate in the low-trust area could present that same session cookie in the high-trust area and get admitted without ever appearing in its keyring. In plain terms: a partner-area login worked as an admin-area login.
This was verified by minting a session in one trust domain and presenting it in the other. Minting means creating a valid session, as the server would. The session was rejected after the fix. Before the fix, the escalation worked.
Request smuggling through an undischarged body
Some responses are generated early in the request lifecycle, before authentication is even evaluated. For example, the server might answer immediately with an error or a redirect without needing to know who you are. When that happens, the incoming request body, the data the browser sent along with the request, has not been read yet.
Nginx's own contract for that situation calls for the body to be explicitly discarded. A contract here means the documented rule the server expects modules to follow. The module did not do that. The unread bytes sat in the connection buffer, the temporary holding area for data arriving on a connection, and got parsed as a second, pipelined request on the same keepalive connection. A keepalive connection is one that stays open for several requests in a row instead of closing after each one; pipelining means sending several requests back to back on it.
The result is request smuggling: one request that the server sees as two. This is dangerous when the module sits behind a reverse proxy or CDN. A reverse proxy is a server in front of the real server that forwards requests to it; a CDN (content delivery network) is a network of such front servers. If the front server and the back server disagree about where one request ends and the next begins, an attacker can slip a request past security checks that only look at the first one.
This was verified with a raw TCP socket sending one request whose body was itself a well-formed HTTP request, then counting response lines. A raw TCP socket means talking to the server directly over the network, without a browser, so you control every byte. Two responses came back on the unfixed build. One came back after the fix. Two responses where there should be one is the signature of smuggling.
Weak identity extraction on a fallback path
The module pulled the signer's cryptographic fingerprint from the verification tool's structured output. A fingerprint is a short, unique value derived from a key that identifies it, like a serial number. Structured output means the tool prints its result in a machine-readable format rather than free text.
The primary extraction path checked that the value was actually a hex fingerprint of the right length. Hex means hexadecimal, a way of writing numbers using the characters 0 to 9 and a to f. A secondary fallback path, kept for compatibility with older verification-tool versions, checked only the length and not the content. A fallback path is an alternative route used when the main one is not available; compatibility means it exists so older tools still work.
A long enough non-hex value would get accepted as an identity and written into a session cookie, a structured log line, and a revocation comparison. A log line is a record the server writes about what happened. Unvalidated subprocess output reaching a response header is a header-injection primitive. A subprocess is a separate program the module runs to do a job; a response header is the metadata a server sends before the page content. Header injection means sneaking extra data into that metadata, which can be used to manipulate the browser or the layers in between.
This was not exploitable against a standard, correctly behaving verification binary, but it was a real gap between two paths that should have enforced the same rule. In other words: the main door had a proper lock, the side door only checked that the key was the right length.
This was verified with a stand-in verification binary built to emit exactly this malformed output. A stand-in binary is a fake replacement program you write yourself to produce the exact bad input you want to test. The exploit worked before the fix and failed after it, in an isolated test run.
Anti-automation throttle gaps, found across two review cycles
The module banned an IP address after a threshold of failed login attempts. A threshold is the number of failures that triggers the ban. This is anti-automation: it stops a program from trying millions of logins.
The first finding involved two of the cheapest failure paths to automate. One was an unreadable request body. The other failed a structural pre-check before verification even ran. A pre-check is a quick test done before the expensive work, for example checking that the request is shaped correctly. Both bypassed the counter entirely, so a client could hammer the login endpoint indefinitely and never trigger the ban. An endpoint is a specific address on the server that accepts requests, here the login address.
The second finding turned up a review cycle later, once that fix was itself scrutinized. The corrected logic had overshot in the other direction. It now counted the module's own internal faults, a failed subprocess fork or an exhausted memory pool, as if they were failed login attempts. A fork is the operating system call that creates a new process; a memory pool is a block of memory the module reuses for its work. A transient infrastructure hiccup, a brief technical glitch on the server side, could lock out every legitimate user for the full ban duration.
This was verified live by forcing a genuine internal fault, an environment misconfiguration that reliably breaks a subprocess call, and confirming the client was never throttled across repeated attempts past the ban threshold. A real bad login attempt, run as a control on an identical instance, was banned exactly as configured. A control is a comparison case you run alongside the test to prove the test setup itself is working.
Build and release pipeline
Signing key exposed to full network access
The container responsible for signing the project's package repository had the private signing key mounted for its entire runtime. A container is a packaged, isolated environment that runs a piece of software; mounting means making a file available inside it. A package repository is the place where installable packages are published. Signing it means stamping the packages so users can verify they came from the project.
That same container ran package-manager commands requiring full internet access for the whole time the plaintext key was present. Plaintext means not encrypted. This is the same failure shape behind at least one real-world supply-chain compromise of a widely used CI tool. A supply chain here means the chain of tools and services that produce and deliver software; CI stands for continuous integration, the automated system that builds and tests code.
Reachability means whether the container can actually connect out to the internet. Before the fix, DNS resolution and outbound connections succeeded the whole time. DNS resolution is turning a name like an address into a numeric address; an outbound connection is the container reaching out to the internet. After the fix split the process into a network-enabled prep stage with no key present and a network-isolated signing stage, both failed outright during signing. Every tool the signing step needed still worked with no network at all.
Unpinned upstream dependencies
Base container images were referenced by mutable tag rather than an immutable content digest. A tag is a human-friendly label like a version name; mutable means it can be changed later to point at something else. A digest is a long value computed from the exact contents of an image, so it changes if the contents change. Immutable means it cannot be swapped without the value changing.
Anyone with push access to the upstream image, or a compromised upstream account, could silently change what the next build pulled in, with no corresponding change visible in the project's own files. Upstream means the source the project takes something from. This was fixed by pinning to specific digests. Pinning means writing down the exact digest so the build always gets that exact content.
It was verified by cross-checking the pinned values against what those tags currently resolve to on the public registry, and by building successfully from the pinned images directly. The public registry is the online service where container images are stored and shared.
Unverified third-party source download
The build process fetched a compressed source archive from an upstream project's official site over TLS, with no integrity check against that project's own published signatures. TLS is the encryption that protects traffic between your browser and a website, the padlock in the address bar. An integrity check means confirming the file is exactly what it should be. A published signature is the project's own stamp proving a file is genuine.
TLS protected the transfer but not against a compromised origin server or a tampered release artifact. The origin server is the machine the file comes from; a release artifact is the file that gets published for download. This is the same mechanism behind a well-known backdoor incident in widely used compression tooling. A backdoor is hidden access planted in software.
It was fixed with a checksum gate against independently verified hash values. A checksum is a value computed from a file's contents; a hash is the same idea with a cryptographic function, so any change to the file changes the value. A gate means the build stops if the check fails. It was verified by downloading the real archive fresh and confirming the hash matched, then deliberately corrupting a copy and confirming the build refused it.
How each fix was actually proven
A few patterns from the methodology are worth calling out because they generalize to any codebase.
A fix might claim to exclude something, like an error type from a counter or a code path from a network. The strongest test is proving that exclusion negatively. Trigger the excluded condition repeatedly and confirm the expected behaviour never fires. Run a working control case in parallel to confirm the mechanism being tested was not just broken outright. In everyday terms: if a sign says "no entry", the test is to keep walking into the door and check it never opens, while also checking that a door that should open still does.
When a fix touches build or release tooling, "does it still build" is not the bar. That means rebuilding from the exact pinned dependencies over a real network. It means hashing real downloaded artifacts against the committed values too. Committed values are the values written into the project's files.
Environment quirks get worked around at the environment level, never by touching the code under test. In this engagement, that meant working around a network-inspection proxy in the test environment that interfered with fresh containers' TLS trust. A proxy is a middleman server that traffic passes through; TLS trust is the set of certificates a system accepts as genuine. Fixing that in the test harness kept the actual code under test unchanged. The principle: if the test lab has a problem, fix the lab, not the thing you are testing.
A green test suite is a necessary condition, not a sufficient one. Green means all tests passed. Several of the findings above existed in a codebase with a substantial passing test suite. The suite simply did not cover the specific failure mode. New, targeted tests closed that gap. They were not written just to confirm the existing ones still passed.
Outcome
Across the engagement, multiple authentication-bypass and session-integrity findings, all rated Critical or High, were closed and independently reproduced before and after the fix. An authentication bypass is a way to get in without proving who you are; session integrity means the session cannot be forged or reused across boundaries. A severity rating of Critical or High is the top end of the usual scale.
A request-smuggling primitive was closed and reproduced with raw-socket testing. A primitive here means a basic building block an attacker can use. Supply-chain and build-pipeline hardening was applied and verified against live infrastructure. Hardening means making something more resistant to attack; live infrastructure means the real systems, not a mock-up.
A pair of related throttling logic errors was caught a full review cycle apart, each verified with targeted fault injection rather than code inspection alone. Fault injection means deliberately causing a specific failure to see how the system reacts. Every fix was confirmed by execution: compiled, run, and attacked. Not by reading the commit message. A commit message is the note an author writes when saving a change.
This is a good fit for teams shipping security-relevant infrastructure code, such as auth modules, API gateways, or anything parsing untrusted input in a systems language, who want confirmation that a fix actually holds, not just a second pair of eyes on the diff. An API gateway is a front door that routes and checks traffic to services behind it; parsing untrusted input means reading data from outside that could be hostile.
Glossary
- API: a defined way for one piece of software to talk to another, like a menu of requests a service accepts.
- API gateway: a front-door service that receives requests and routes or checks them before they reach the services behind it.
- Application logic: the rules and behaviour of a feature itself, as opposed to the infrastructure it runs on.
- Authentication: proving who you are.
- Authentication bypass: getting in without proving who you are.
- Anti-automation: defences that make it hard for a program, rather than a person, to hammer a feature.
- Base image: the starting container a build runs in, before your own code is added.
- Binary: a finished program produced by compiling source code.
- Build step: a stage of the process that turns source code into a runnable program.
- CDN: content delivery network, a set of front servers that cache and forward traffic to the real server.
- Challenge: a random piece of text a server issues for a client to sign, proving it holds the key.
- Checksum: a value computed from a file's contents, used to detect changes.
- CI: continuous integration, the automated system that builds and tests code.
- Commit message: the note an author writes when saving a change to a code repository.
- Compiled binary: the finished program produced by a build.
- Configuration directive: a setting written in a config file that tells software how to behave.
- Container: a packaged, isolated environment that runs a piece of software.
- Control: a comparison case run alongside a test to prove the test setup itself works.
- Cookie: a small piece of data a browser stores for a site and sends back with each request.
- Critical / High: the top end of the usual severity scale for security findings.
- Cross-boundary session reuse: using a session issued in one trust domain to get into another.
- Cryptographic MAC: message authentication code, a short value computed with a secret that proves data has not been altered.
- Dependency: another piece of software your code relies on.
- Diff: the list of lines that changed between two versions of a file.
- Digest: a long value computed from the exact contents of an image or file, so it changes if the contents change.
- DNS resolution: turning a name into a numeric address so a computer can connect.
- Dynamic analysis: tools that watch a program while it runs.
- Endpoint: a specific address on a server that accepts requests.
- Expiry check: confirming a session is still valid time-wise.
- Fallback path: an alternative route used when the main one is not available.
- Fault injection: deliberately causing a specific failure to see how the system reacts.
- Fingerprint: a short, unique value derived from a key that identifies it.
- Fix: a change made to repair a problem.
- Fork: the operating system call that creates a new process.
- Fuzz harness: the setup that feeds a program large amounts of random or malformed input to see if it crashes.
- Fuzzing: feeding a program large amounts of random or malformed input to find crashes and misbehaviour.
- Green test suite: a set of automated checks where all tests passed.
- Hardening: making something more resistant to attack.
- Hash: a value computed from a file's contents with a cryptographic function, so any change to the file changes the value.
- Header injection: sneaking extra data into the metadata a server sends before the page content.
- Hex: hexadecimal, a way of writing numbers using the characters 0 to 9 and a to f.
- Immutable: cannot be changed without the value changing.
- Integrity check: confirming a file is exactly what it should be.
- IP address: the numeric address that identifies a computer on the internet.
- Keepalive connection: a connection that stays open for several requests in a row instead of closing after each one.
- Keyring: the set of keys a trust domain trusts.
- Live infrastructure: the real systems, not a mock-up.
- Log line: a record the server writes about what happened.
- Memory pool: a block of memory a program reuses for its work.
- Module: an extra piece of code that plugs into a larger program and adds a feature.
- Mounting: making a file available inside a container.
- Mutable: can be changed later to point at something else.
- Nginx: a widely used web server program.
- OpenPGP: a well-known standard for encrypting and signing data.
- Origin server: the machine a file comes from.
- Outbound connection: a connection a computer makes out to the internet.
- Package repository: the place where installable packages are published.
- Parsing: reading data and working out its structure.
- Passwordless authentication: logging in without a password, for example by signing a challenge with a private key.
- Patch: a small change meant to fix a problem.
- Per-IP rate limiting: counting attempts per IP address and slowing or banning addresses that try too often.
- Pinning: writing down an exact digest so a build always gets that exact content.
- Pipelining: sending several requests back to back on one connection.
- Plaintext: not encrypted.
- Pre-check: a quick test done before the expensive work.
- Private key: a secret file that only its owner has, used to sign data.
- Propagate: travel from where a setting is read to where it is used.
- Proxy: a middleman server that traffic passes through.
- Public key: the matching public half of a key pair that anyone can see, used to check signatures.
- Publish: make a file available for download.
- Push access: permission to upload changes to a shared image or repository.
- Raw TCP socket: talking to a server directly over the network, without a browser, so you control every byte.
- Reachability: whether a computer can actually connect out to the internet.
- Release artifact: the file that gets published for download.
- Replay: recording a valid message and sending it again later to pretend to be the sender.
- Replay protection: making sure an old signed challenge cannot be reused.
- Repository state: the actual current files in a code repository.
- Request body: the data a browser sends along with a request.
- Request smuggling: making one request look like two, so a front server and a back server disagree about where one ends and the next begins.
- Response header: the metadata a server sends before the page content.
- Reverse proxy: a server in front of the real server that forwards requests to it.
- Revocation checking: checking whether a key has been cancelled or withdrawn.
- Sanitizer: a tool that watches a running program and catches memory errors or undefined behaviour.
- Session: the server's way of remembering you between requests.
- Session integrity: the session cannot be forged or reused across boundaries.
- Session issuance: creating a session and handing it to the browser.
- Severity rating: a label for how serious a finding is.
- Signature: a mathematical stamp proving data came from whoever holds the key and has not been altered.
- Signing: stamping packages or files so users can verify they came from the project.
- Static analysis: tools that read code without running it and flag suspicious patterns.
- Structured output: a machine-readable format rather than free text.
- Subprocess: a separate program that a program runs to do a job.
- Supply chain: the chain of tools and services that produce and deliver software.
- Tag: a human-friendly label like a version name.
- Test suite: a set of automated checks.
- Threshold: the number of failures that triggers a ban.
- TLS: the encryption that protects traffic between a browser and a website.
- TLS trust: the set of certificates a system accepts as genuine.
- Transient: brief and temporary.
- Trust domain: a separate area of a site that trusts its own set of signing keys.
- Upstream: the source a project takes something from.
- Verification: checking behaviour, not intention.
- Web server: a program that answers requests from browsers over the internet.
- Worker process: the part of a web server that actually handles requests.