View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006670 | unreal | ircd | public | 2026-11-25 23:13 | 2026-11-26 12:56 |
| Reporter | jdefr89 | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 6.2.8-rc1 | ||||
| Summary | 0006670: An evil configuration file can lead to command execution (out of scope) | ||||
| Description | I won't lie this was a tricky one... Not sure best way to describe it so I will stick to raw technical fact that can be reproduced. unrealircd -R (the crash reporter, which ./unrealircd start runs automatically on every interactive restart — unrealircd.in:106) looks for the newest "core" file in the IRCd's temp directory and interpolates that filename into shell commands, unquoted, at three popen() sites: src/crashreport.c:152-155 (crash_report_fix_libs): src/crashreport.c:241-244 (crash_report_backtrace) src/crashreport.c:465-468 (attach_coredump) find_best_coredump() (src/crashreport.c:14-44) - accepts any filename in the temp directory that contains the substring "core" (excluding only .so/.conf/.txt/.done). There is no whitelist of real core dumps: a file named: z.$(touch${IFS}AAVR_PWNED).core makes the shell execute the $(...) substitution before gdb is even started (gdb is not required to be installed; the substitution happens in the shell while building the command line). | ||||
| Steps To Reproduce | Will include in bundle | ||||
| Additional Information | I have some more vulns too.. Just wanted to get this weird one out of the way. My apologies in advance. Note: I don't submit CVEs or anything. I leave that up to maintainers. If you'd like to credit me great. If not I will live. | ||||
| Attached Files | unrealircd-crashreport-cmdinjection.zip (24,945 bytes) | ||||
| 3rd party modules | |||||
|
|
Good morning, A couple of things: 1) It is not really nice to say on IRC that you found an RCE, whether it is true or not. There is no need to say that publicly, that's what the bug tracker is for. It's also not that your bug report was being ignored, as you talked about it 4 minutes after submitting the bug report. 2) This is not an RCE. The R there stands for "Remote". There is nothing remote about this. 3) The tmp directory exists in ~/unrealircd/tmp and is created 0700. Only the same user (eg 'ircd') can create or read files in that directory (and root). 4) See https://www.unrealircd.org/docs/Policy:_Handling_of_security_issues#Scope,_classification_and_handling "Issues that require shell access as the same user running UnrealIRCd are not considered security issues. " More in depth: The UnrealIRCd directory for temporary files is not public on purpose. There's decades of history of security issues with public tmp directories such as /tmp. We don't use those. We use a private temp directory. As said, it is created in ~/unrealircd/tmp with 0700. So only the same user can create or read files there. There is no privilege escalation: the same user that can put evil stuff there can already do the same without taking such steps. There is no security issue here. If you have a real security issue that eg someone can trigger remotely on a real server, then feel free to report more. As usual as a 'private' issue here on the bug tracker. We are always interested in those. A summary of our security policy can be found at https://github.com/unrealircd/unrealircd/blob/unreal60_dev/SECURITY.md and the full one is at https://www.unrealircd.org/docs/Policy:_Handling_of_security_issues |
|
|
Oh okay, I now see the .zip file with a README.md in it that is more verbose. As in: it also talks about the "R" bit :D Step by step you need: 1) A remote include 2) The server hosting that remote include, needs to do do another remote include with some evil shell characters. Eg that server needs to be hacked or the admin is not trustworthy. 3) UnrealIRCd needs to crash, stop or restart during downloading #2 4) Then when UnrealIRCd starts, it can execute the code So, just to keep in perspective: if a server hosting a remote include is hacked or the admin there is not trustworthy, they can already do everything configuration file wise. They can just throw things in the remote include like an oper block, or anything. |
|
|
I'm not saying it is ideal, but the problem is, if we start treating remote includes as some kind of untrusted stuff... it's a whole rabbit hole. It's a fundamental thing. You could also log to ~/.bashrc for instance and do stuff with that. And there are other vectors as well. The config file is/was never meant to be something "untrusted". I have updated https://www.unrealircd.org/docs/Policy:_Handling_of_security_issues#Scope%2C_classification_and_handling to add: Out of scope: * Issues that require a bad guy to edit a configuration file are out of scope. The configuration file (and remote includes) are considered trusted. I don't think that's a strange security boundary or decision. Other projects do the same: nginx, Apache, NodeJS all consider their configuration trusted (changing the config file by a bad guy is out of scope). I have set this report to 'public' now. EDIT: And renamed the title to "An evil configuration file can lead to command execution (out of scope)" And again, if you have anything that can be triggered remotely on a real server then feel free to report as 'private' here on the bug tracker. That's always interesting. Keeping in mind the https://www.unrealircd.org/docs/Policy:_Handling_of_security_issues and https://github.com/unrealircd/unrealircd/blob/unreal60_dev/SECURITY.md policy of course. As you know, I already audit UnrealIRCd with AI, but there's always a chance I can miss something, or like in this case, where there is something but it is out of scope and we should better communicate that (so thanks for that!). |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-25 23:13 | jdefr89 | New Issue | |
| 2026-11-25 23:13 | jdefr89 | File Added: unrealircd-crashreport-cmdinjection.zip | |
| 2026-11-26 09:25 | syzop | Note Added: 0023755 | |
| 2026-11-26 10:01 | syzop | Note Added: 0023756 | |
| 2026-11-26 12:34 | syzop | Note Edited: 0023756 | |
| 2026-11-26 12:48 | syzop | Note Added: 0023758 | |
| 2026-11-26 12:48 | syzop | Priority | urgent => normal |
| 2026-11-26 12:48 | syzop | View Status | private => public |
| 2026-11-26 12:56 | syzop | Summary | E2E RCE exec shell commands hidden in core-dump filenames: find_best_coredump() passes any "core" filename to popen => An evil configuration file can lead to command execution (out of scope) |
| 2026-11-26 12:56 | syzop | Note Edited: 0023758 |