Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High risk vulnerability (Critical severity) #3

Open
LeoNeeson opened this issue Jun 8, 2024 · 9 comments
Open

High risk vulnerability (Critical severity) #3

LeoNeeson opened this issue Jun 8, 2024 · 9 comments

Comments

@LeoNeeson
Copy link

Hi!, this is only a reminder. Since you maintain a fork of HFS, and in case you didn't know, a severe vulnerability (that demands immediate attention) has been recently discovered, known to affect HFS v2.4.0 RC7 and v2.3m. It's CVE-2024-23692, and you will find more information, on the following links:

Even if Rejetto made his versions 2.3.x and 2.4.x as 'obsolete' (or 'no longer supported'), there are too many HFS-based servers still running (including yours), that will never know about this issue, until it's too late (when they've already been hacked). I'm sure Rejetto and his community, will appreciate if you submit a patch for his build too... :)

Cheers,
Leo.-

@rejetto
Copy link

rejetto commented Jun 12, 2024

in my tests, 2.4rc7 doesn't seem to be affected in its default configuration, that is with default template, as its template doesn't use the "get|url" command.

correction: the POC in the latest link is not affecting rc7, but the one on "attackerkb.com" is

@drapid
Copy link
Owner

drapid commented Jun 12, 2024

I think the problem is in this line https://github.com/rejetto/hfs2/blob/140528bac87e4ae37d444b218b5ef6ff793edc80/scriptLib.pas#L121
So that not all symbols "%" replaced.
I think change to "ReplaceStr(s, '%','%')" should work better.

drapid added a commit that referenced this issue Jun 12, 2024
Fix for #3
@rejetto
Copy link

rejetto commented Jun 13, 2024

image

these are the steps that lead to the execution

@LeoNeeson
Copy link
Author

I'm doing some Public Relations (PR) here, to alert others about this vulnerability (discovered by @mohemiv). Please forgive me if this notice bothers or upsets someone (in this case, remember that “it's better be safe than sorry”). This message is to notify all those who have a copy or fork of HFS2: https://github.com/rejetto/hfs2

(List of users who have a fork of HFS2) [Part 1] @10ae; @1aq; @1INSIDIOUS; @24minFan; @506124204; @674778709; @93Codes; @a1198457636; @aifans; @ajunlonglive; @Alligator-1; @Amoystyle; @arvindown; @atkins126; @AtotallyRandomGuy; @AureliusPatiens; @Azimiao; @barlowhaydnb; @bb33bb; @blkdevcon; @blog2i2j; @Brainhub24; @bryanchance; @cbcs; @ccwy; @cedececa; @ChasingD; @classic130; @CrazyForks; @crazyNing; @cyrex562; @diegoverdan; @divinity76; @do8pgg; @dsvabek; @ducbang; @FallPeanut; @ffrbl; @flyarong; @GaryLao; @GitCnSH-DSLIN; @gmh5225; @goofwear; @h824612113; @ha271923; @hafewa; @harishgavel;

@LeoNeeson
Copy link
Author

» Regardless development has moved onto HFS3, and even if HFS2 probably won't be updated by @rejetto, any collaboration will be useful to others who also have a fork of HFS2 (and compile the binaries on their own). Those who want to collaborate, can leave a comment on this issue, or even better, send a 'Pull request' on the original project: https://github.com/rejetto/hfs2/pulls

(List of users who have a fork of HFS2) [Part 2] @hi-noikiy; @HowardWhile; @IcyG1045; @icyhoty2k; @iloeng; @iMeta1; @ios1024; @jacelift; @jacobin; @jeethualex; @jn7163; @josedachao; @JosiahMg; @juankprz; @junqinhu; @khongten001; @l-g-t; @lakecenter; @lanxianhui; @laojiajun; @LeChatNoir666; @lianghuiyuan; @lion8418; @lllrrr2; @LordGarfio; @lzxkulou; @mangoriver; @mapoupier; @mcubeta; @minol; @mnplay; @mybbsky2012; @ncnnnnn; @netusb; @neverso; @oabi; @ojbkxc; @Ok-every-day; @oycl; @peaceanddemocracy; @pigbaby6309; @prafulbusa; @PravinShahi0007; @progray; @Loop80; @protonuniverse;

@mybbsky2012
Copy link

mybbsky2012 commented Jun 14, 2024 via email

@LeoNeeson
Copy link
Author

Being listed here, doesn't mean you have any commitment or obligation to collaborate with this issue. If you don't want to collaborate, please disregard this notice. This is only an informational message!

(List of users who have a fork of HFS2) [Part 3] @RahimBangla; @redcocoa; @redlinejoes; @redtrillix; @rellai; @rsiralla; @sdlkdsdda; @shayanw; @shead0n; @simhaonline; @simrit1; @siwa2-w; @snakegj; @SWDRam; @swoky; @TengShow; @teze; @VantIer; @venhow; @vivienskm; @waldonhendricks; @wesinator; @weweaaa; @wuenci666; @xGreat; @xiaoshzx; @xsgx; @xxfwajj84; @XZVB12; @yangjinhe; @yogtop; @z-cub; @mr-highball; @Zhengzhouhao; @zmf963; @zxysm; @ZZKK000

» Code submission guidelines (Code contribution suggestions):
Although HFS v2.4.0 RC7 was compiled using modern (Unicode compatible) Delphi versions, since this vulnerability also applies to HFS v2.3m, which was originally compiled using “Turbo Delphi 2006” (similar to ‘Delphi 2007‘), please keep changes compatible with older Delphi versions. Please keep changes small and focused (meaning: no code clean-ups, no new features). This applies to everyone, except for @rejetto (the original developer), and @drapid (the owner of this repository), those who may do whatever they want/wish.


By the way, this vulnerability was published yesterday in the legendary ‘Packet Storm Security’ website: https://packetstormsecurity.com/files/179083/Rejetto-HTTP-File-Server-HFS-Unauthenticated-Remote-Code-Execution.html
 

@rejetto
Copy link

rejetto commented Jul 6, 2024

I think change to "ReplaceStr(s, '%','%')" should work better.

won't this change badly affect style attributes using % ?

@mybbsky2012
Copy link

mybbsky2012 commented Jul 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants