CVE-2016-1238

Impact:
Moderate
Public Date:
2016-07-25
Bugzilla:
1355695: CVE-2016-1238 perl: loading of modules from current directory
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.

Find out more about CVE-2016-1238 from the MITRE CVE dictionary dictionary and NIST NVD.

CVSS v2 metrics

NOTE: The following CVSS v2 metrics and score provided are preliminary and subject to review.

Base Score 6.2
Base Metrics AV:L/AC:H/Au:N/C:C/I:C/A:C
Access Vector Local
Access Complexity High
Authentication None
Confidentiality Impact Complete
Integrity Impact Complete
Availability Impact Complete

CVSS v3 metrics

NOTE: The following CVSS v3 metrics and score provided are preliminary and subject to review.

CVSS3 Base Score 6.7
CVSS3 Base Metrics CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Attack Vector Local
Attack Complexity High
Privileges Required Low
User Interaction Required
Scope Unchanged
Confidentiality High
Integrity Impact High
Availability Impact High

Find out more about Red Hat support for the Common Vulnerability Scoring System (CVSS).

Affected Packages State

Platform Package State
Red Hat Software Collections for Red Hat Enterprise Linux rh-perl524-perl Will not fix
Red Hat Software Collections for Red Hat Enterprise Linux rh-perl524-perl-CPAN Will not fix
Red Hat Software Collections for Red Hat Enterprise Linux perl516-perl Will not fix
Red Hat Software Collections for Red Hat Enterprise Linux rh-perl520-perl Will not fix
Red Hat Enterprise Linux 7 perl Will not fix
Red Hat Enterprise Linux 6 perl Will not fix
Red Hat Enterprise Linux 5 perl Will not fix

Acknowledgements

Red Hat would like to thank the Perl project for reporting this issue. Upstream acknowledges John Lightsey (cPanel Security Team) and Todd Rinaldo (cPanel Security Team) as the original reporters.

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.

Last Modified