Red Hat Quay CVE-2026–123710: Registry Takeover and Fixes
The Quay service key server accepted a rotation request if it carried a token signed by a trusted key with the expected audience and issuer, without checking that the token was issued for key rotation. An unauthenticated client could therefore install its own trusted signing key, then mint tokens to read private images and overwrite tags.
medium.com
Published on medium.com
Security
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
Red Hat Quay is a container registry that teams run on-premises and on OpenShift. Quay signs the tokens that authorise registry access, and the signing keys are managed by a service key server. Keys can be rotated through an API. CVE-2026-123710 is a flaw in the way that key server decides whether a rotation request is allowed. Red Hat scores it 9.8 (Critical) with the CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N: network, low complexity, no privileges, no user interaction. The weakness class is CWE-1287, improper validation of the specified type of input.
As described by Red Hat, a client with no account can install its own trusted signing key. After that it can read private images and overwrite tags. If you run Quay, the registry itself is at risk, and so is every system that pulls from it.

The vulnerability details here come from Red Hat and from security press coverage, because I could not run Quay itself. The nginx mitigation described below was tested.
Setup
The attack needs no account and no user interaction. Anonymous access, which one report says is enabled by default, is enough. With anonymous access disabled, Red Hat says any valid Quay account can still exploit the flaw.
Affected products, according to The Hacker News' reading of Red Hat's data, are Red Hat Quay 3 and 5, including standalone deployments, the Quay Operator on OpenShift and the mirror registry for OpenShift.
For the proxy mitigation, I tested nginx 1.24 in front of a dummy upstream.
Finding it
The key server accepts a rotation request if it carries a token signed by a trusted key with the expected audience and issuer. It does not check that the token was issued for key rotation. That is the gap: a token minted for ordinary registry access is accepted as authority to change the registry's signing keys.
Exploitation
Step 1: obtain an anonymous token
An unauthenticated client requests an anonymous registry token from the auth endpoint (/v2/auth) and chooses the audience.
Step 2: pass the key server's checks
That token passes the key server's checks, so the client can ask the key server to add or rotate a key.
Step 3: the attacker's key becomes trusted
The attacker's key is accepted as trusted. It can be set with no expiry, and it survives restarts.
Step 4: sign tokens for any repository
With that key the attacker can sign tokens that Quay honours for any repository, and can pull private images or push tampered ones under existing tags.
Step 5: side effects on legitimate keys
Red Hat's report also says the rotation deletes the legitimate instance key as a side effect, and the attacker's key can delete replacement keys. That can break legitimate pushes and pulls.
Two consequences follow from this design:
- Turning off anonymous access does not protect you. Red Hat says any valid Quay account can still exploit the flaw.
- Resetting passwords or regenerating robot tokens does not remove the attacker's key. The key lives in Quay's key store, not in a user credential.
A second flaw in the same fix: CVE-2026-110697
The same researcher, Red Hat's Dave O'Connor, found a related issue, scored 9.9. As The Hacker News describes it, the robot-account listing code builds a SQL LIKE pattern from the namespace name without escaping wildcards. In SQL LIKE, an underscore matches any single character, so a crafted namespace can match another tenant's namespace and return its robot accounts with their tokens. The only prerequisite reported is the ability to create a namespace. Stolen robot tokens allow reading, pushing or overwriting another tenant's images.
It is the same class of mistake as forgetting that % and _ are special inside a LIKE. Escape them, or use an exact match when you mean one.
Root cause
The key server validates the signature, audience and issuer of the presented token, but not the purpose it was issued for. A token minted at /v2/auth for registry access is therefore treated as sufficient authority to add or rotate signing keys. Because the attacker's key is stored in Quay's key store with no expiry and survives restarts, it outlives any credential rotation. The second flaw is a missing escape of _ and % when a namespace name is interpolated into a SQL LIKE pattern.
Impact
An attacker can install a signing key that Quay trusts, then mint tokens that give read and write access to repositories. That means exposure of private images and any secrets inside them, and the ability to replace images that other systems pull. The rotation also deletes the legitimate instance key, and the attacker's key can delete replacement keys, which can break legitimate pushes and pulls. Compromise of a key means you should treat what that key could access as exposed.
None of the coverage read says the flaw is exploited in the wild, and one vendor write-up lists "no public exploit". That can change quickly.
Teams that should worry most:
- Teams running Quay on a network reachable by many users, partners or the internet.
- Multi-tenant installations, because of the second flaw.
- Anyone whose CI/CD pulls base images or deploy images from Quay automatically. A swapped image is a supply chain attack on everything downstream.
- OpenShift users on the integrated registry or the mirror registry, which are listed as affected by The Hacker News.
Red Hat's hosted Quay.io service was listed as already patched for the second CVE at the time of disclosure by one write-up; there was no equivalent statement found for the first one, so check Red Hat's notice if you use the hosted service.
Fix
Upstream fixes were merged on 11 November. Red Hat has published fixed builds for several Quay 3 branches. The Hacker News reports fixed builds for eight Quay 3 branches, and also notes that, when it checked, the CVE entry still showed no fix, and that the second CVE was not listed in the individual advisories. A third-party aggregator's summary of Red Hat advisory RHSA-2026:99026 (Red Hat Quay 3.17.7, published 11 November, updated 13 November) lists both CVE-2026-123710 and CVE-2026-110697 among 25 fixed CVEs; the errata page itself could not be opened, so confirm it on Red Hat's site. No fixed Quay 5 build was identified in the sources read.
In practice: find your Quay version, look up the errata for your branch on the Red Hat Customer Portal, and upgrade to the build that lists CVE-2026-123710. If your branch has no fixed build yet, use the mitigations below and follow Red Hat's solution article referenced in the coverage.
Mitigation 1: restrict the key endpoint
Red Hat's mitigation is to restrict access to the /keys endpoint at the proxy or load balancer, so that only trusted internal components can reach it. Here is an nginx example. Adjust the network range to match your internal services:
location /keys { allow [redacted]/16; deny all; proxy_pass http://quay_backend;}
Replace quay_backend with your real upstream, and keep your existing proxy settings. This snippet is not a complete Quay configuration.
Tested with nginx 1.24 in front of a dummy upstream, from a client outside the allowed range, all of these returned 403: /keys, /keys/services/quay/keys/abc, //keys/x, /%6beys/x (URL-encoded) and /keysfoo (it is a prefix match), and so did a PUT. From an allowed client, the same path reached the upstream and returned 200.
Things to note:
/KEYS(upper case) was not blocked; it reached the upstream. nginx matches paths case-sensitively. Whether Quay treats that path as the same endpoint could not be checked, so test your own deployment and, if needed, deny at a broader level.- If another load balancer sits in front of nginx, the client address nginx sees is that balancer's. Configure real client IP handling, or apply the restriction on the outermost layer.
- One vendor write-up also suggests limiting
/v2/auth. Be careful: ordinarydocker loginand pulls go through the auth endpoint, so blocking it for clients will break normal use. Red Hat's stated mitigation names/keysonly. - Check which parts of your own platform (Clair, build workers, operators) talk to the key server before you apply a deny rule, so you do not cut them off.
Mitigation 2: look for planted keys
Red Hat's guidance is to review audit logs for service_key_rotate and service_key_delete events where the expiration_date is null, and to remove unrecognised approved keys. Legitimate service keys are normally expected to expire, so a key with no expiry added through the key server deserves attention. The exact query depends on how you export Quay's audit log (the UI, the log database or your log shipper).
Two cautions from Red Hat's text: deleting a rogue key is not durable until you are on a fixed build, because the attacker can add it again, and compromise of a key means you should treat what that key could access as exposed.
Mitigation 3: patch
Upgrade to a fixed build as described above. After the upgrade, repeat the audit-log and key review, since a key planted earlier would survive an upgrade unless you remove it.
Verifying images
If your registry was reachable by untrusted clients while vulnerable, you cannot tell from the registry alone that a tag still points to what you built. The defence is not to trust tags at all.
- Reference images by digest in Kubernetes manifests and deployment files:
image: quay.example.com/org/app@sha256:<digest>. A digest identifies content; if someone overwrites a tag, a deployment pinned by digest still gets the original image or fails to pull. - Record the digest at build time, in your CI output, and compare it with what the registry serves now. Tools such as
skopeo inspectorcrane digestcan read a digest from a registry. These were not run against Quay. - Audit recent pushes and tag changes for ones you cannot match to a pipeline run.
- Rotate secrets that were baked into images. Private images can contain credentials, and this flaw exposes private images. Rotating the Quay robot tokens alone is not enough, as noted above.
- Consider image signing (for example Sigstore's cosign) so deployment can verify who built an image. That is a broader project and was not tested here.
Common mistakes
- Disabling anonymous access and considering the problem solved. Any valid account can still exploit it.
- Rotating user passwords and robot tokens, but leaving a rogue signing key in place.
- Deleting a suspicious key before patching, and not checking that it did not come back.
- Blocking
/v2/authbroadly and breaking normal logins. - Patching without checking that your branch's errata actually lists the CVE.
- Pulling by mutable tags (
:latest,:prod) when integrity matters.
Variants to test
- Case variants of the protected path. Send
/KEYSand mixed-case forms through your proxy. A positive result is the request reaching the upstream instead of being denied; whether Quay treats that path as the same endpoint is unconfirmed. - Path normalisation tricks. Try
//keys/x,/%6beys/xand/keysfooagainst your own rule. A positive result is any of them reaching the upstream; in the tested nginx configuration all three were denied, but other proxies normalise differently. - Prefix versus exact matching. Check whether a rule on
/keysalso covers/keysfoo. A positive result is a sibling path that shares the prefix being allowed or denied unexpectedly. - Client address behind a second load balancer. Place a balancer in front of the proxy and send requests from outside the allowed range. A positive result is the allow rule matching the balancer's address rather than the real client's.
- Token purpose confusion in other services. Wherever a service accepts a signed token, check whether it validates the purpose or scope the token was issued for, not just signature, audience and issuer. A positive result is a token minted for one function being accepted by another.
- Wildcard injection in namespace lookups. Create a namespace containing
_or%and observe whether listings return another tenant's robot accounts. A positive result is robot accounts or tokens belonging to a namespace you do not own. - Key persistence. After adding a key through the key server, restart the service and check whether the key is still trusted. A positive result is the key surviving a restart, so restarting does not clear it.
What happened, in plain words
Red Hat Quay is a piece of software that stores container images. A container image is a packaged bundle of an application and everything it needs to run, and teams keep these bundles in a central library so that servers can download them when they need to start the application. Quay is one of those libraries, and many organisations run their own copy of it on their own machines, or on OpenShift, which is Red Hat's platform for running applications in a managed way.
To decide who is allowed to download or upload an image, Quay hands out small digital passes called tokens. Each token is signed, meaning it carries a cryptographic stamp that proves Quay itself produced it. The stamps are made with signing keys, which are long random strings kept by Quay. Because keys can be replaced from time to time, Quay has a small internal service, the key server, whose job is to accept requests to add or replace keys.
CVE-2026-123710 is a flaw in the way that key server decides whether such a request is allowed. A CVE is simply a public catalogue number for a known security bug, so people can talk about the same bug unambiguously. Red Hat scores this one 9.8 out of 10, which it labels Critical, using a standard scoring system called CVSS. The score's shorthand, AV:N/AC:L/PR:N/UI:N, means the attack can be carried out over the network, needs little skill or luck, needs no account, and needs no action from any victim.
In plain terms: someone with no account at all can convince Quay to trust a signing key that the attacker made. Once Quay trusts that key, the attacker can write their own passes, read private images, and replace images that other systems download. If you run Quay, the library itself is at risk, and so is every machine that takes things from it.

The technical details in this article come from Red Hat and from security press coverage, because I could not run Quay itself. The nginx mitigation described further down was tested.
The pieces you need to know
Before the attack makes sense, a few everyday ideas need names.
- Container registry: the library of container images. Think of a warehouse of sealed boxes, each box holding a ready-to-run application.
- Image and tag: an image is one of those boxes. A tag is a sticky label on the box, such as
latestorprod. Labels can be moved from one box to another, which matters later. - Token: a short digital pass, like a cloakroom ticket. You show it, and the person at the desk checks it is genuine before handing over your coat. In software, the token is a string of characters sent with each request.
- Signing key: the stamp used to mark a token as genuine. Only the holder of the stamp can produce a convincing mark.
- API: a way for one program to talk to another, like a service counter in a shop. You make a request in a fixed format, and you get a response back. The key server is reached through an API.
- Endpoint: one specific counter in that shop.
/keysis the counter for key operations, and/v2/authis the counter where tokens are handed out. - Audience and issuer: two fields written on a token. The audience says who the token is meant for, and the issuer says who made it. Like a ticket that says which theatre it is for and which box office sold it.
- Anonymous access: letting people use the registry without logging in, the way a public reading room lets anyone walk in.
- Proxy and load balancer: a receptionist standing in front of the registry. Every request passes through the receptionist first, and the receptionist can turn people away before they reach the back office. nginx is a common piece of software used for this job.
- CWE-1287: the catalogue name for this kind of mistake, "improper validation of the specified type of input". In everyday words: the software checked that the visitor had a ticket, but not what the ticket was for.
Who is affected, and what it takes to attack
The attack needs no account and no action from anyone at the target. Anonymous access, which one report says is switched on by default, is enough. If anonymous access has been switched off, Red Hat says any valid Quay account can still exploit the flaw.
According to The Hacker News' reading of Red Hat's data, the affected products are Red Hat Quay 3 and 5, including standalone deployments, the Quay Operator on OpenShift and the mirror registry for OpenShift. A standalone deployment is Quay installed directly on your own servers. The Quay Operator is a helper that installs and manages Quay on OpenShift for you. The mirror registry is a local copy of images that OpenShift clusters use so they do not have to reach the internet.
For the proxy mitigation, I tested nginx 1.24 in front of a dummy upstream. A dummy upstream is a stand-in back office that does nothing except answer requests, used so that the test does not touch a real registry.
Where the gap is
The key server accepts a request to add or replace a key if the request carries a token signed by a trusted key, with the expected audience and issuer. It does not check that the token was issued for key rotation.
That is the gap. A token handed out for ordinary registry access, the equivalent of a ticket to read books in the reading room, is accepted as authority to change the registry's signing keys, the equivalent of authority to re-key the building. The receptionist checked that the ticket was genuine and issued by the right box office, but never checked what it was a ticket for.
How the attack works, step by step
Step 1: obtain an anonymous token
An unauthenticated client requests an anonymous registry token from the auth endpoint (/v2/auth) and chooses the audience.
In plain words: the attacker's program walks up to the token counter and asks for a visitor pass, without logging in. It also states which audience the pass should name, and the counter obliges. Nothing here is unusual; this is the same counter that ordinary tools use when they download a public image.
Step 2: pass the key server's checks
That token passes the key server's checks, so the client can ask the key server to add or rotate a key.
The attacker now takes that ordinary visitor pass to the key counter. The key server checks the stamp, the audience and the issuer, all of which are correct, and lets the request through. It never asks whether this pass was meant for key operations.
Step 3: the attacker's key becomes trusted
The attacker's key is accepted as trusted. It can be set with no expiry, and it survives restarts.
An expiry is a date after which a key stops working, like a passport with an end date. The attacker's key is given none, so it never lapses on its own. Surviving restarts means the key is written into Quay's permanent storage, so switching the service off and on again does not remove it.
Step 4: sign tokens for any repository
With that key the attacker can sign tokens that Quay honours for any repository, and can pull private images or push tampered ones under existing tags.
A repository is one shelf in the warehouse, holding all the versions of one application. Pulling means downloading an image, and pushing means uploading one. Because Quay now trusts the attacker's stamp, the attacker can mint passes for any shelf, read private images, and upload altered images under labels that other systems already trust.
Step 5: side effects on legitimate keys
Red Hat's report also says the rotation deletes the legitimate instance key as a side effect, and the attacker's key can delete replacement keys. That can break legitimate pushes and pulls.
In other words, the attacker does not just add a key; the act of adding it knocks out the real key. And if the defenders put a new real key in place, the attacker can knock that one out too. Normal uploads and downloads then fail, which is a denial of service on top of the data exposure.
Two consequences follow from this design:
- Turning off anonymous access does not protect you. Red Hat says any valid Quay account can still exploit the flaw.
- Resetting passwords or regenerating robot tokens does not remove the attacker's key. The key lives in Quay's key store, not in a user credential.
A robot account is a non-human account that automation uses, with its own token. Changing passwords and robot tokens is like changing the locks on the front door while the intruder still holds a copy of the master key to the building. The rogue key sits in Quay's key store, a separate cupboard from user credentials, and stays there until someone removes it.
A second flaw in the same fix: CVE-2026-110697
The same researcher, Red Hat's Dave O'Connor, found a related issue, scored 9.9. As The Hacker News describes it, the robot-account listing code builds a SQL LIKE pattern from the namespace name without escaping wildcards. In SQL LIKE, an underscore matches any single character, so a crafted namespace can match another tenant's namespace and return its robot accounts with their tokens. The only prerequisite reported is the ability to create a namespace. Stolen robot tokens allow reading, pushing or overwriting another tenant's images.
Some terms first. SQL is the language used to ask a database questions. A namespace is a named area that belongs to one team or tenant, like a labelled section of shelving. A tenant is one customer sharing the same installation. A wildcard is a symbol that stands for other characters. In SQL's LIKE matching, % stands for any run of characters and _ stands for exactly one character.
The listing code takes the namespace name and drops it straight into a LIKE pattern. If a tenant creates a namespace whose name contains _, that underscore is not treated as a literal underscore but as "any single character". The pattern can then match a different tenant's namespace, and the listing returns that tenant's robot accounts together with their tokens. The only thing an attacker needs is the ability to create a namespace.
It is the same class of mistake as forgetting that % and _ are special inside a LIKE. Escape them, or use an exact match when you mean one. Escaping means marking a special character so it is read literally, the way you put a backslash before a character in a document to stop it being treated as formatting.
The root cause, in one place
The key server validates the signature, audience and issuer of the presented token, but not the purpose it was issued for. A token minted at /v2/auth for registry access is therefore treated as sufficient authority to add or rotate signing keys. Because the attacker's key is stored in Quay's key store with no expiry and survives restarts, it outlives any credential rotation. The second flaw is a missing escape of _ and % when a namespace name is interpolated into a SQL LIKE pattern.
Interpolated means pasted into a larger piece of text. The namespace name is pasted into the database query without its special characters being neutralised, so the name changes the meaning of the query instead of just being data inside it.
What the attacker gets
An attacker can install a signing key that Quay trusts, then mint tokens that give read and write access to repositories. That means exposure of private images and any secrets inside them, and the ability to replace images that other systems pull. The rotation also deletes the legitimate instance key, and the attacker's key can delete replacement keys, which can break legitimate pushes and pulls. Compromise of a key means you should treat what that key could access as exposed.
Secrets inside images are things like passwords and access keys that were baked into the image when it was built. If an image leaks, those secrets leak with it, and they must be treated as known to the attacker even if you have no proof they were used.
None of the coverage read says the flaw is exploited in the wild, and one vendor write-up lists "no public exploit". That can change quickly. Exploited in the wild means real attackers are using it, as opposed to it merely being possible.
Teams that should worry most:
- Teams running Quay on a network reachable by many users, partners or the internet.
- Multi-tenant installations, because of the second flaw.
- Anyone whose CI/CD pulls base images or deploy images from Quay automatically. A swapped image is a supply chain attack on everything downstream.
- OpenShift users on the integrated registry or the mirror registry, which are listed as affected by The Hacker News.
CI/CD is the automated pipeline that builds and ships software. A supply chain attack means tampering with something early in that chain so that everything built afterwards inherits the tampering, like swapping a crate of ingredients at the supplier so that every meal made from it is affected.
Red Hat's hosted Quay.io service was listed as already patched for the second CVE at the time of disclosure by one write-up; there was no equivalent statement found for the first one, so check Red Hat's notice if you use the hosted service. Hosted means Red Hat runs it for you, rather than you running it yourself.
The fix
Upstream fixes were merged on 11 November. Upstream means the main open-source project that the product is built from. Red Hat has published fixed builds for several Quay 3 branches. A branch is a line of development for one version series, so a fix has to be applied to each line separately.
The Hacker News reports fixed builds for eight Quay 3 branches, and also notes that, when it checked, the CVE entry still showed no fix, and that the second CVE was not listed in the individual advisories. A third-party aggregator's summary of Red Hat advisory RHSA-2026:99026 (Red Hat Quay 3.17.7, published 11 November, updated 13 November) lists both CVE-2026-123710 and CVE-2026-110697 among 25 fixed CVEs; the errata page itself could not be opened, so confirm it on Red Hat's site. An advisory is the official notice that a fix exists, and an errata page is Red Hat's own page listing what a particular update fixes. No fixed Quay 5 build was identified in the sources read.
In practice: find your Quay version, look up the errata for your branch on the Red Hat Customer Portal, and upgrade to the build that lists CVE-2026-123710. If your branch has no fixed build yet, use the mitigations below and follow Red Hat's solution article referenced in the coverage.
Mitigation 1: restrict the key endpoint
Red Hat's mitigation is to restrict access to the /keys endpoint at the proxy or load balancer, so that only trusted internal components can reach it. Here is an nginx example. Adjust the network range to match your internal services:
location /keys { allow [redacted]/16; deny all; proxy_pass http://quay_backend;}
Line by line, in plain words:
location /keys {opens a rule that applies to any request whose path begins with/keys. This is the key counter, the one the attacker needs.allow [redacted]/16;says that requests coming from addresses in that network range are allowed through. The/16is a way of writing a whole block of addresses rather than a single one, like saying "any house on this street" instead of naming one door.deny all;says everyone else is turned away at the door.proxy_pass http://quay_backend;says that allowed requests are then passed on to the real Quay service, which is referred to here by the placeholder namequay_backend.- The closing
}ends the rule.
Replace quay_backend with your real upstream, and keep your existing proxy settings. This snippet is not a complete Quay configuration. An upstream is simply the server behind the proxy, the back office the receptionist forwards visitors to.
Tested with nginx 1.24 in front of a dummy upstream, from a client outside the allowed range, all of these returned 403: /keys, /keys/services/quay/keys/abc, //keys/x, /%6beys/x (URL-encoded) and /keysfoo (it is a prefix match), and so did a PUT. From an allowed client, the same path reached the upstream and returned 200.
A 403 is the standard web answer meaning "forbidden", and 200 means "OK". A PUT is one of the standard request types, used when a client wants to create or replace something. URL-encoded means a character written in a coded form, so %6b is just another way of writing the letter b. A prefix match means the rule fires for any path that starts with the protected text, which is why /keysfoo was caught even though it is not the real endpoint.
Things to note:
/KEYS(upper case) was not blocked; it reached the upstream. nginx matches paths case-sensitively. Whether Quay treats that path as the same endpoint could not be checked, so test your own deployment and, if needed, deny at a broader level. Case-sensitive means upper and lower case letters are treated as different characters, soKEYSandkeysare two different words to the proxy.- If another load balancer sits in front of nginx, the client address nginx sees is that balancer's. Configure real client IP handling, or apply the restriction on the outermost layer. This is like a receptionist who only ever sees the courier company's van, never the person who sent the parcel, so an allow rule based on the sender's address checks the wrong thing.
- One vendor write-up also suggests limiting
/v2/auth. Be careful: ordinarydocker loginand pulls go through the auth endpoint, so blocking it for clients will break normal use. Red Hat's stated mitigation names/keysonly. Blocking the token counter is like closing the ticket office to stop one kind of misuse: nobody can get a ticket for anything any more. - Check which parts of your own platform (Clair, build workers, operators) talk to the key server before you apply a deny rule, so you do not cut them off. Clair is a scanner that checks images for known problems, build workers are the machines that build images, and operators are the helpers that manage software on OpenShift. These are internal colleagues who legitimately need the key counter, so make sure the rule still lets them in.
Mitigation 2: look for planted keys
Red Hat's guidance is to review audit logs for service_key_rotate and service_key_delete events where the expiration_date is null, and to remove unrecognised approved keys. Legitimate service keys are normally expected to expire, so a key with no expiry added through the key server deserves attention. The exact query depends on how you export Quay's audit log (the UI, the log database or your log shipper).
An audit log is the registry's diary of who did what and when. service_key_rotate and service_key_delete are the names of two kinds of diary entry: one for replacing a key and one for deleting a key. expiration_date is the field that records when a key stops working, and null means the field is empty, so the key never expires. A log shipper is software that copies the diary to a central place for searching. The point of this check is simple: a key that was added through the key server and never expires is exactly what the attack leaves behind.
Two cautions from Red Hat's text: deleting a rogue key is not durable until you are on a fixed build, because the attacker can add it again, and compromise of a key means you should treat what that key could access as exposed. Durable here means the removal sticks. On an unfixed build, the same gap is still open, so the attacker can simply repeat step 2 and put the key back.
Mitigation 3: patch
Upgrade to a fixed build as described above. After the upgrade, repeat the audit-log and key review, since a key planted earlier would survive an upgrade unless you remove it. Patching means installing the corrected version of the software. The upgrade closes the door, but anything the intruder left inside the building is still there, which is why the review is repeated afterwards.
Verifying images
If your registry was reachable by untrusted clients while vulnerable, you cannot tell from the registry alone that a tag still points to what you built. The defence is not to trust tags at all.
- Reference images by digest in Kubernetes manifests and deployment files:
image: quay.example.com/org/app@sha256:<digest>. A digest identifies content; if someone overwrites a tag, a deployment pinned by digest still gets the original image or fails to pull. - Record the digest at build time, in your CI output, and compare it with what the registry serves now. Tools such as
skopeo inspectorcrane digestcan read a digest from a registry. These were not run against Quay. - Audit recent pushes and tag changes for ones you cannot match to a pipeline run.
- Rotate secrets that were baked into images. Private images can contain credentials, and this flaw exposes private images. Rotating the Quay robot tokens alone is not enough, as noted above.
- Consider image signing (for example Sigstore's cosign) so deployment can verify who built an image. That is a broader project and was not tested here.
A digest is a long fingerprint computed from the exact contents of an image. Change one byte and the fingerprint changes, so a digest is a reliable way to name one specific box rather than a label that can be moved. A Kubernetes manifest is the file that tells Kubernetes, the system that runs containers, which image to start. Pinning by digest means writing the fingerprint instead of the label, so a moved label cannot redirect you to a different box. Rotating secrets means replacing them with new ones and retiring the old ones. Image signing means attaching a cryptographic stamp to an image so that the machine starting it can check who built it.
Common mistakes
- Disabling anonymous access and considering the problem solved. Any valid account can still exploit it.
- Rotating user passwords and robot tokens, but leaving a rogue signing key in place.
- Deleting a suspicious key before patching, and not checking that it did not come back.
- Blocking
/v2/authbroadly and breaking normal logins. - Patching without checking that your branch's errata actually lists the CVE.
- Pulling by mutable tags (
:latest,:prod) when integrity matters. A mutable tag is a label that can be moved to a different image at any time, so what you download today may not be what you downloaded yesterday.
Variants to test
These are checks you can run against your own setup, to see whether your protection actually holds. Each one names what a positive result looks like, meaning the sign that something is wrong.
- Case variants of the protected path. Send
/KEYSand mixed-case forms through your proxy. A positive result is the request reaching the upstream instead of being denied; whether Quay treats that path as the same endpoint is unconfirmed. - Path normalisation tricks. Try
//keys/x,/%6beys/xand/keysfooagainst your own rule. A positive result is any of them reaching the upstream; in the tested nginx configuration all three were denied, but other proxies normalise differently. Normalisation is the process of tidying up a path before comparing it, and different proxies tidy differently. - Prefix versus exact matching. Check whether a rule on
/keysalso covers/keysfoo. A positive result is a sibling path that shares the prefix being allowed or denied unexpectedly. - Client address behind a second load balancer. Place a balancer in front of the proxy and send requests from outside the allowed range. A positive result is the allow rule matching the balancer's address rather than the real client's.
- Token purpose confusion in other services. Wherever a service accepts a signed token, check whether it validates the purpose or scope the token was issued for, not just signature, audience and issuer. A positive result is a token minted for one function being accepted by another. Scope means the set of things a token is allowed to do.
- Wildcard injection in namespace lookups. Create a namespace containing
_or%and observe whether listings return another tenant's robot accounts. A positive result is robot accounts or tokens belonging to a namespace you do not own. - Key persistence. After adding a key through the key server, restart the service and check whether the key is still trusted. A positive result is the key surviving a restart, so restarting does not clear it.
Glossary
- Advisory: an official notice from a vendor that a security problem exists and what fixes it.
- Anonymous access: letting people use a service without logging in.
- API: a fixed way for one program to send requests to another and get answers back.
- Audience: the field on a token naming who the token is meant for.
- Audit log: a diary of actions taken in a system, with who did what and when.
- Branch: one line of development for a version series, which receives its own fixes.
- CI/CD: the automated pipeline that builds, tests and ships software.
- Container image: a packaged bundle of an application and everything it needs to run.
- Container registry: a central library that stores and serves container images.
- CVE: a public catalogue number for a known security bug.
- CVSS: a standard scoring system for the severity of a security bug.
- CWE-1287: the catalogue name for the mistake of not validating the specified type of input.
- Digest: a long fingerprint computed from the exact contents of an image, used to name one specific version.
- Endpoint: one specific address in an API where a particular operation is offered.
- Errata page: a vendor page listing what a particular software update fixes.
- Escaping: marking a special character so it is read literally instead of being treated as a command.
- Expiry / expiration date: the date after which a key or token stops working.
- Exploited in the wild: real attackers are using the flaw, as opposed to it merely being possible.
- Hosted service: a service the vendor runs for you, rather than one you run yourself.
- Image signing: attaching a cryptographic stamp to an image so its origin can be checked.
- Interpolation: pasting a value into a larger piece of text, such as a database query.
- Issuer: the field on a token naming who made it.
- Key server: the internal Quay service that accepts requests to add or replace signing keys.
- Kubernetes manifest: the file that tells Kubernetes which image to run and how.
- Load balancer: software that sits in front of servers and shares incoming requests among them.
- Log shipper: software that copies logs to a central place for searching.
- Mitigation: a temporary measure that reduces risk while a proper fix is applied.
- Mutable tag: a label on an image that can be moved to a different image at any time.
- Namespace: a named area in a system that belongs to one team or tenant.
- nginx: a common piece of software used as a web server and as a proxy.
- Normalisation: tidying up a path or name into a standard form before comparing it.
- OpenShift: Red Hat's platform for running applications in containers.
- Operator: a helper program that installs and manages software on OpenShift.
- Patching: installing the corrected version of software.
- Prefix match: a rule that fires for any path starting with the protected text.
- Proxy: software that stands in front of a service and forwards or refuses requests.
- Pull / push: download an image from a registry / upload an image to a registry.
- Repository: one named shelf in a registry holding all versions of one application.
- Robot account: a non-human account used by automation, with its own token.
- Rotate: replace a key, password or token with a new one and retire the old one.
- Scope: the set of things a token is allowed to do.
- Secret: a password, key or similar value that must stay private.
- Signing key: the cryptographic stamp used to mark a token as genuine.
- SQL: the language used to ask a database questions.
- Supply chain attack: tampering with something early in a build process so everything built afterwards inherits the tampering.
- Tenant: one customer sharing the same installation with others.
- Token: a short digital pass presented with a request to prove it is allowed.
- Upstream: the main open-source project a product is built from, or the server behind a proxy.
- URL-encoded: a character written in a coded form, such as
%6bforb. - Wildcard: a symbol that stands for other characters, such as
%and_in SQLLIKE. - 403 / 200: standard web answers meaning "forbidden" and "OK".
- PUT: a standard request type used to create or replace something.