arcane icon indicating copy to clipboard operation
arcane copied to clipboard

⚠️ Security: Default Trivy image may be compromised

Open neurekadev opened this issue 8 months ago • 25 comments

The default Trivy image (ghcr.io/aquasecurity/trivy:latest) was compromised via a malicious v0.69.4 release on March 19, 2026.

Source: https://github.com/aquasecurity/trivy/discussions/10425

Security advisory: https://github.com/aquasecurity/trivy/security/advisories/GHSA-69fq-xp46-6x23

neurekadev avatar Mar 21 '26 23:03 neurekadev

Was the latest Arcane Image 1.16.3 using one of the Trivy versions that were compromised?

shannonr avatar Mar 22 '26 04:03 shannonr

Was the latest Arcane Image 1.16.3 using one of the Trivy versions that were compromised?

I believe arcane has trivy pinned to latest, so it would depend on when everyone's image was last pulled.

Edit: I believe over 70 tags were affected. If Trivy was pulled during that time, they technically had access to the docker socket and all volumes.

From what I understand, it was an info stealer that scanned the file system so I don't think it had the capability to do more than that but I could be wrong.

neurekadev avatar Mar 22 '26 07:03 neurekadev

So if you didn’t manually scan or hadn’t auto scan enabled, you’re good?

Toastienergy avatar Mar 22 '26 09:03 Toastienergy

So if you didn’t manually scan or hadn’t auto scan enabled, you’re good?

Yes. :)

neurekadev avatar Mar 22 '26 16:03 neurekadev

Thank you @NeurekaSoftware , Appreciate you opening this issue. I am reading on this now, and as you stated if a scan was not done with v 0.69.4 of trivy you should be fine. The malicious release was only available for 3-4 hours it seems like so it may be a small window.

kmendell avatar Mar 22 '26 16:03 kmendell

Thank you @NeurekaSoftware , Appreciate you opening this issue. I am reading on this now, and as you stated if a scan was not done with v 0.69.4 of trivy you should be fine. The malicious release was only available for 3-4 hours it seems like so it may be a small window.

It might be worth mentioning, it's possible somebody here was affected.

Also, it might be safer to pin Trivy to a version and full SHA256 digest.

neurekadev avatar Mar 22 '26 16:03 neurekadev

Would be good to know how arcane handles the scans. Does it pass any volume mounts or anything like that? I read that the injected script only runs after 5min of trivy running.

Toastienergy avatar Mar 22 '26 16:03 Toastienergy

Arcane basically just spins up a temporary trivy container and runs a scan against the image, then removes the container

Image

kmendell avatar Mar 22 '26 17:03 kmendell

Thank you @NeurekaSoftware , Appreciate you opening this issue. I am reading on this now, and as you stated if a scan was not done with v 0.69.4 of trivy you should be fine. The malicious release was only available for 3-4 hours it seems like so it may be a small window.

It might be worth mentioning, it's possible somebody here was affected.

Also, it might be safer to pin Trivy to a version and full SHA256 digest.

I made a message in discord, and i will make a patch to ping to 0.69.3 by default and overide anything that uses latest right now as well.

kmendell avatar Mar 22 '26 17:03 kmendell

Arcane basically just spins up a temporary trivy container and runs a scan against the image, then removes the container

I believe Trivy also has access to the docker socket, right? So in theory, it would have access to the docker engine and could gain access to all volumes and even the host machine.

That said, I believe they determined that this info stealer only scraped the local filesystem after 5 minutes. There was no mention of it abusing anything else. I believe this means that it would basically scrape inside of the trivy container if it was running for more than 5 minutes. Nothing useful there outside of the docker socket, which it didn't access.

I made a message in discord, and i will make a patch to ping to 0.69.3 by default and overide anything that uses latest right now as well.

Perfect, thank you! There is always some risk, but pinning should let newer updates cook and settle before updating.

Another option is to use a docker socket proxy: https://docs.linuxserver.io/images/docker-socket-proxy/

For example, the lsio image allows you to very easily enable and disable what parts of the docker api is accessible.

That does place trust in yet another image, but it's better to trust 1 image with full docker socket access instead of 5 for example.

Quite a few nice tools that people use need access to the docker socket, and some of them only need limited read-only access. Think caddy docker proxy, dozzle, beszel.

Anyways, thanks again for listening to feedback!

neurekadev avatar Mar 22 '26 18:03 neurekadev

Oh, and @kmendell you should pin to the full SHA256. Even in this case, old tags were force pushed. Pinning to SHA256 would prevent this attack vector.

neurekadev avatar Mar 22 '26 18:03 neurekadev

@kmendell Might need to do another announcement? As after all the above was announced by trivy, there were further malicious releases, this time specifically Docker images (https://github.com/aquasecurity/trivy/discussions/10425#discussioncomment-16261683), noticed some ~18 hours ago. The original security advisory has been updated to include them.

equinox avatar Mar 23 '26 14:03 equinox

@kmendell Might need to do another announcement? As after all the above was announced by trivy, there were further malicious releases, this time specifically Docker images (https://github.com/aquasecurity/trivy/discussions/10425#discussioncomment-16261683), noticed some ~18 hours ago. The original security advisory has been updated to include them.

Third attack btw. What the hell is going on over there...

neurekadev avatar Mar 23 '26 15:03 neurekadev

@kmendell we need a SHA pin and Arcane release ASAP.

Edit: these tags were pushed to docker hub and I believe arcane uses ghcr.

Still, we need a SHA pin stat. Trivy is in a constant state of being compromised.

neurekadev avatar Mar 23 '26 15:03 neurekadev

Ill get it done in a bit, didnt have much free time today, until i get it done, you can set the default image to ghcr.io/aquasecurity/trivy@sha256:bcc376de8d77cfe086a917230e818dc9f8528e3c852f7b1aff648949b6258d1c in the settings thats the pinned hash of 0.69.3.

I will eventually just re-roll the image on arcanes packages instead that way if it happens again it wont matter as its not using taht image.

kmendell avatar Mar 23 '26 19:03 kmendell

So what do we need to do to get out this malicious trivy build inside our Arcane ??

MilesTEG1 avatar Mar 23 '26 20:03 MilesTEG1

You don’t have to do anything, even if you run a scan earlier, the container gets destroyed after the scan

Toastienergy avatar Mar 23 '26 20:03 Toastienergy

1.16.4 will force the scanner to use the pinned digest, and i disabled configuring the trivy image for now.

kmendell avatar Mar 23 '26 22:03 kmendell

Hopefully not a dumb question, but!: on Arcane 1.16.3, did it pull trivy:latest when the Arcane image was pulled, or did the scheduled scans pull trivy:latest on each scan?

andygeorge avatar Mar 24 '26 16:03 andygeorge

I believe Trivy also has access to the docker socket, right? So in theory, it would have access to the docker engine and could gain access to all volumes and even the host machine.

Can we consider using a docker socket proxy with read-only access to Trivy that is independent and separate from whether a docker socket proxy is for Arcane itself and its permissions? This could at least help with protecting against container escapes into the host, if implemented well?

lgp171188 avatar Mar 29 '26 18:03 lgp171188