CVE-2016-1238
perl: loading of modules from current directory
Severity
ModerateRed Hat Product Security
CVSS 3.0
Review impact separately from score.
Published · July 25, 2016
Updated · November 21, 2025
Description
It was found that perl can load modules from the current directory if not found in the module directories, via the @INC path. A local, authenticated attacker could create a specially crafted module in a writable directory and trick a user into running a perl program from that directory; if the module is not found in previous @INC paths, it will load and execute the attacker's module.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
The following examples will remove '.' from the module path :
RHEL6 and above : Create a file /usr/local/share/perl5/sitecustomize.pl containing the line "pop @INC if $INC[-1] eq '.';"
RHEL5: Create a perl module with the same code in a BEGIN block, and use the 'PERL5OPT=-m<module-name>' environment variable to load it before execution of a perl program.
CVSS / CWE
CVSS 3.0 · 6.7CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0 · 6.2AV:L/AC:H/Au:N/C:C/I:C/A:C
CWE not specified