EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10443
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Perl CGI module restriction on maximum file upload to 128MB
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Perl CGI module restriction on maximum file upload to 128MB
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Fri, 27 Nov 2026 16:19:16 +0000
Hi all,
I have just been reading a recent CVE issued for the Perl CGI module (i.e. CGI.pm, typically installed by perl-CGI RPM or libcgi-pm-perl DEB packages):
https://nvd.nist.gov/vuln/detail/cve-2026-120650
The headline message is that for security reasons you should update to the latest version of this for you operating system (e.g. dnf update or apt upgrade) but that once you have done the latest version of the Perl CGI module has put in place mitigations to prevent servers that run it from suffering Denial-of-Service (DoS) due to resource (i.e. memory) exhaustion. However, one of the effects of these mitigations is to limit the max file upload on EPrints to 128MB. This will present itself in a way that allows a user to start uploading a file larger that 128MB but once it looks like the upload is all but complete, the page will hang indefinitely and the file will not have been added to the eprint record.
The max upload restriction should be a temporary mitigation but it is not clear yet what the final resolution will be and when it will be available for install. Therefore, if you have suddenly found you cannot upload files (just) larger than 128MB, then you can either choose to inform your users of this temporary limit, (if you are on EPrints 3.4.5+ you can temporarily update $c->{max_upload_filesize} to 128 MB and re-run generate_apacheconf to stop user even starting to upload a larger file) or if uploading larger files is essential, then consider applying a temporary modification similar to that below to roughly line 86 or perl_lib/EPrints/Repository.pm (after the "use CGI qw(-compile);") line:
$CGI::POST_MAX = 1024 * 1024 * 1024;
This will allow uploads up to 1GB. However, this does potentially reintroduce the DoS attack vector that the upgraded perl CGI package is trying to mitigate. So you do this at your own risk.
I have also identified that if you submit forms in the eprint workflow that have a lot of elements (e.g. thousands of creators), then a mitigation has also be put in place to limit this to 10,000. Typically the creators field has a first name, given name and ID/email sub-field. So you may only have 3500 creators but this will lead to 10,500 form elements, which would exceed the limit introduced by this mitigation.
I will keep people posted in this email thread if I hear anything more about a new version of perl CGI that fixes the security issues reported in the CVE, without putting limits on max file size uploads, etc.
Regards
David Newman
- Prev by Date: Re: [EP-tech] IMPORTANT - Security updates to all version of EPrints
- Next by Date: [EP-tech] bug or feature: zero valued float export couldn't be re-imported
- Previous by thread: [EP-tech] Eprints upload broken, ubuntu 26.04 collatoral damage?
- Next by thread: [EP-tech] bug or feature: zero valued float export couldn't be re-imported
- Index(es):
