6 ms·
Security flaws in an SSO plugin for Caddy (2023)
- positr0n 3y agoIt's this the most popular/common Caddy plugin for SSO?
- Filligree 3y agoAre there alternatives?
- francislavoie 3y agoYes, using Authelia (or similar) + Caddy's forward_auth directive https://caddyserver.com/docs/caddyfile/directives/forward_auth https://caddyserver.com/docs/caddyfile/directives/forward_au...
- theChaparral 3y agoIt's #9 on the overall 'plugin" list
- SushiHippie 3y agoWhat list do you base this on?
- mdeeks 3y agoLikely this one: https://caddyserver.com/download https://caddyserver.com/download
- jrpelkonen 3y agoUsing math/rand seeded with a timestamp to generate crypto materials does not instill high confidence in the skills of the team. But their lack of interest in addressing the issues raised here is perhaps even more worrying. If I was a user of this plugin, I’d start looking for alternatives pronto.
- mholt 3y agoTo be clear, "the team" you refer to is one burnt-out developer (and not the Caddy maintainer team). Having been through burnout myself several times, I can understand the lack of response. I'm sure the project would benefit greatly if the community and companies who use it could bolster it up.
- lifthrasiir 3y agoI do feel the pain as well, but the OP specifically says "confirmed" (i.e. there indeed was a response) without no further qualification. If the plugin author did say the underlying reason, I believe the OP should have reproduced the reason as well because it's an even bigger security risk in my opinion.
- devwastaken 3y agoRipe for a PR.
- blinded 3y agoExactly!
- rrdharan 3y ago> August 23, 2023: The caddy-security plugin maintainers confirmed that there were no near-term plans to act on the reported vulnerabilities. Ouch. I was considering switching from oauth2_proxy to Caddy + SSO but this is pretty discouraging..
- mdeeks 3y agoDiscouraging? Huge understatement. An auth plugin that refuses to fix multiple high severity vulnerabilities is wild. No one should use this plugin for anything. If I were the Caddy authors I would remove all references to this project and ask that they stop use of the Caddy name.
- Aeolun 3y agoI mean, do you feel you have a right to get those fixes for free? I'm sure you are welcome to contribute them.
- nixgeek 3y agoNo, but I'd also hope that new and existing users of what's probably a popular middleware for Caddy aren't expected to read 100's of open GitHub Issues or luck upon the Trail of Bits report to know there are significant unresolved security issues and the maintainers don't have the time or resources to actually fix them. Better know that up front, than get popped and think "What happened?".
- tgsovlerkhgsel 3y agoAt the very least, there should be a clear warning not to use the current version of the software. And I think it's reasonable to suggest that the main project authors should neither advertise software that's dangerously insecure nor allow it to use the main project's name (which could mislead people into assuming that it's part of the project and similarly well maintained).
- Aeolun 3y ago
- yogorenapan 3y agoI took a look around and the plug-in doesn’t seem to be actively maintained. Most commits within the last year has been simple dependency version bumps. Wouldn’t use it even if not for these security issues.
- mholt 3y agoThe project could definitely use some help from the community, or financial support. I believe Paul may be open to opportunities there. I know his current job has kind of burnt him out.
- mholt 3y agoMods: This should probably should have a [2023] appended to the title
- HumanOstrich 3y ago[flagged]
- francislavoie 3y agoTo be clear, this is about a third party plugin of Caddy, not about Caddy itself. And the author of the plugin is burnt out by their FAANG day job. I wouldn't call tabs vs spaces "personal style preferences". Caddy is written in Go, and we adopted the idea of "caddy fmt" from "gofmt". And warnings are warnings, not errors. They're soft reminders that you can safely ignore.
- deleted 3y ago[deleted]
- HumanOstrich 3y ago[flagged]
- francislavoie 3y agoFor the purposes of preservation, since you deleted two of your comments and made a new reply: https://i.imgur.com/n7ckJnT.png https://i.imgur.com/n7ckJnT.png I'm not sure why you're taking an aggressive tone. Of course the Caddyfile is not Go, but I'm saying it's inspired by it, and we made a design decision in alignment with the project's relationship with Go.
- rat9988 3y agoWhy did you post a picture of a deleted post. Op doesn't wish to share it anymore. You could have respected his wish.
- francislavoie 3y agoBecause they were trying to gaslight me. They edited their original post with simply "." and then deleted their reply to mine, and made a new reply. Then after I posted the screenshot, they reverted their original post and added a rude comment as an edit.
- yonixwm 3y agoWhy is it the plugin job to mitigate IP Spoofing via X-Forwarded-For Header? Isn’t it the first gateway job? Just like I wouldn’t blame a container server for cdn not making sure X-Forwarded-For is not passed from the client… Meaning how will the plugin know how levels deep is it in the infrastructure… and if you really care about warning devs then it should be a caddy level security bug, not this plugin specifically. So all those spoofing items is really out of scope for this plugin…
- francislavoie 3y agoCaddy itself has built-in support for correctly & safely parsing XFF via the trusted_proxies global option https://caddyserver.com/docs/caddyfile/options#trusted-proxies https://caddyserver.com/docs/caddyfile/options#trusted-proxi... The plugin should use the parsed client IP produced by this, but the plugin was written before trusted_proxies existed in Caddy. (Not excusing the mistake, but there's an "easy" solution if someone wants to resolve it.)
- yonixwm 3y agoAgain why mention the plugin? Just use the main caddy option… plugins are ment to expand caddy not replace existing directives unless i am missing something and the plugin overrides default behavior then of course it’s to blame
- buro9 3y agoI think a security plugin author should have the awareness that X-Forwarded-For is just a string of untrusted user input. That definitely is the job of a security plugin author who uses the value. Whether it's lesson number one or number two... Don't trust your inputs has got to be near the top of things you learn when doing anything with security. Edit: now I've read the article... Shocked. The vast majority of this is trusting untrusted user input.
- kalev 3y agoHuge credits to the Caddy team, I’ve been using Caddy for all of my production projects over 4+ years and it’s absolutely rock solid. Never had an issue with it. Unfortunate a 3rd party plugin here is causing fallout by other HNers dumping their negative remarks here. Still, a security plugin which seems to have holes in it is a bit awkward. I’m sure someone will pick up what’s needed to be done.
- ThePhysicist 3y agoYeah, occasional security issues are part of the game and nothing to be ashamed of, on the other hand Caddy's headline is "makes your sites more secure, more reliable, and more scalable than any other solution". Maybe they should cut back one the hyperbole a bit. Seems a bit like the situation with Wordpress, the core is pretty solid security-wise but the third-party ecosystem isn't as well-tested or maintained.
- hhh 3y agoWhy should they cut back on their offerings because of a third party plugin?
- ThePhysicist 3y agoThey can do what they want of course, for me it just sounds like hyperbole. People seem to be unable to give a realistic description of their software, everything always has to be the fastest, most scalable, most secure. Personally it's a red flag especially in regards to security as it shows a cavalier attitude. Using e.g. math/rand instead of crypto/rand is a really basic mistake and something that any decent security reviewer would flag immediately. Trusting headers that can be spoofed is also one of the most basic attack vectors that e.g. a penetration tester will try out when seeing that a server makes use of header information for a security-critical code path. I mean people use this stuff in production to secure personal and other sensitive data, and they do so because the website literally tells them "it's the most secure solution out there". I don't think most people get that the plugins are not part of the official distribution or have a different, much lower standard in terms of engineering security. That's the core issue for me, it's fine if your contributors are burnt out and don't have time to fix security issues, it's not day their job, but then stop telling people your solution is the best, most secure solution out there. And if they want to support people then pay them, Caddy is owned by a large company so they should be able to pay maintainers for their most security-critical plugins. I really don't want to be too harsh, it's a great piece of software, but I'm tired of this marketing tendency to wildly exaggerate capabilities and properties of software systems.
- deleted 3y ago[deleted]
- Danielben 3y ago[flagged]