PCI v3.2-6.5.1
CAPEC-170
CWE-94
HIPAA-164.306(a)
ISO27001-A.14.2.5
WASC-33
OWASP 2013-A1
OWASP 2017-A1
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Code Execution via Local File Inclusion

Severity:
Critical
Summary

Invicti detected code execution via local file inclusion, which occurs when a file from the target system is injected into the attacked page and interpreted as code.

At the beginning of the attacking phase, Invicti made an HTTP request which contained custom payload and saw the output of execution of it at this page. This means this code has been executed, and this vulnerability generally happens with inclusion of log files by LFI-vulnerable PHP scripts.

Impact

An attacker can execute malicious code by abusing the Local File Inclusion vulnerability on the server.

Remediation

  • If possible, do not permit file paths to be appended directly. Make them hard-coded or selectable from a limited hard-coded path list via an index variable.
  • If you definitely need dynamic path concatenation, ensure you only accept required characters such as "a-Z0-9" and do not allow ".." or "/" or "%00" (null byte) or any other similar unexpected characters.
  • It's important to limit the API to allow inclusion only from a directory and directories below it. This ensures that any potential attack cannot perform a directory traversal attack.

Required Skills for Successful Exploitation

Significant attacking skills are required because there is no tool or automated way to exploit this vulnerability. The attack consists of three phases: detecting the vulnerability, finding malicious code (or if possible creating one, by uploading an image, etc.) on the targeted system, and including that code via the identified vulnerability to run it. Generally the attacker needs to find the physical path of server access logs or needs to upload an image to the server or abuse /proc/self/ functionality in Linux systems where possible.

Actions To Take
Vulnerability Index

You can search and find all vulnerabilities

Select Vulnerability
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Featured resources

Blog

Strengthening enterprise application security: Invicti acquires Kondukto

Blog

Modern AppSec KPIs: Moving from scan counts to real risk reduction

Blog

Friends don’t let friends shift left: Shift smarter with DAST-first AppSec

Blog

Vibe talking: Dan Murphy on the promises, pitfalls, and insecurities of vibe coding

Blog

What lies ahead for CMS.

Blog

How to integrate CMS with other tools.

Blog

Improve user experience through CMS.

Blog

How CMS can benefit e-commerce.

Blog

Stay updated on CMS trends.

Blog

Tips for improving CMS performance.

Blog

Learn how to secure your CMS.

Blog

Explore the advantages of CMS.

Blog

A comprehensive guide to CMS.

Build your resistance to threats. And save hundreds of hours each month.