Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticated Unrestricted File Write in letter.php (2) #1214

Open
prodigysml opened this issue Jul 23, 2018 · 0 comments
Open

Authenticated Unrestricted File Write in letter.php (2) #1214

prodigysml opened this issue Jul 23, 2018 · 0 comments
Labels
Web Security White Hat Reports, Cross Site SQL Injection, etc

Comments

@prodigysml
Copy link

The Issue

Unrestricted file write vulnerabilities allow attackers to write file such as PHP files, in locations where the web server user has access to write. This may allow an attacker to write files with malicious content and may lead to remote code execution.

An attacker must be authenticated to perform this attack.

Where the Issue Occurred

The following code snippet displays the usage of the fopen function in PHP within the lh-ehr application:

$fh = fopen("$template_dir/".$_POST['form_template'], 'w');

This creates or overwrites a file that the web server user has access to. The following code snippet displays writing user controlled content within the user controlled file:

if (! fwrite($fh, $temp_bodytext)) {

@tmccormi tmccormi added the Web Security White Hat Reports, Cross Site SQL Injection, etc label Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Security White Hat Reports, Cross Site SQL Injection, etc
Projects
None yet
Development

No branches or pull requests

2 participants