Bugzilla – Attachment 186082 Details for
Bug 40748
Remote-Code-Execution (RCE) in update_social_data.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40748: Fix RCE in update_social_data.pl
Bug-40748-Fix-RCE-in-updatesocialdatapl.patch (text/plain), 1.45 KB, created by
Jake Deery
on 2025-09-03 15:45:11 UTC
(
hide
)
Description:
Bug 40748: Fix RCE in update_social_data.pl
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2025-09-03 15:45:11 UTC
Size:
1.45 KB
patch
obsolete
>From ba2e853667a1eb52072b45ba42a3cfd64e221288 Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@openfifth.co.uk> >Date: Wed, 3 Sep 2025 15:41:14 +0000 >Subject: [PATCH] Bug 40748: Fix RCE in update_social_data.pl > >This patch fixes an identified RCE in the update_social_data.pl >social_data, which when executed, allows an attacker to run arbitrary >code on the system's shell. > >TO TEST: > >a) In the Babeltheque_url_update syspref, wrap any bash in $(), and then >run the update_social_data.pl script. > *) For example, $(whoami > >/tmp/rce.log) will output to a file the username the perl script is >running as. >APPLY PATCH >b) Run the update_social_data.pl script again. The string is now >meta-escaped, and the RCE no longer works. >--- > misc/cronjobs/social_data/update_social_data.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/cronjobs/social_data/update_social_data.pl b/misc/cronjobs/social_data/update_social_data.pl >index e0de0aa1ce8..dff5a1c4856 100755 >--- a/misc/cronjobs/social_data/update_social_data.pl >+++ b/misc/cronjobs/social_data/update_social_data.pl >@@ -6,7 +6,7 @@ use Koha::Script -cron; > use C4::Context; > use C4::SocialData; > >-my $url = C4::Context->preference("Babeltheque_url_update"); >+my $url = quotemeta( C4::Context->preference("Babeltheque_url_update") ); > my $output_dir = qq{/tmp}; > my $output_filepath = qq{$output_dir/social_data.csv}; > system(qq{/bin/rm -f $output_filepath}); >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40748
:
186080
|
186082
|
186111
|
186114
|
186116
|
186117
|
186924