CVE-2016-1238
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.
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.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 6.7 | 7.8 | N/A |
| Attack Vector | Local | Local | N/A |
| Attack Complexity | High | Low | N/A |
| Privileges Required | Low | Low | N/A |
| User Interaction | Required | None | N/A |
| Scope | Unchanged | Unchanged | N/A |
| Confidentiality | High | High | N/A |
| Integrity Impact | High | High | N/A |
| Availability Impact | High | High | N/A |
Vector
Red Hat: CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v2 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 6.2 | 7.2 | N/A |
| Attack Vector | Local | Local | N/A |
| Access Complexity | High | Low | N/A |
| Authentication | None | None | N/A |
| Confidentiality Impact | Complete | Complete | N/A |
| Integrity Impact | Complete | Complete | N/A |
| Availability Impact | Complete | Complete | N/A |
Vector
Red Hat: AV:L/AC:H/Au:N/C:C/I:C/A:C
NVD: AV:L/AC:L/Au:N/C:C/I:C/A:C
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.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.