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

A Directory Traversal vulnerability #40

Closed
Zh3-H4ck opened this issue Nov 12, 2019 · 3 comments
Closed

A Directory Traversal vulnerability #40

Zh3-H4ck opened this issue Nov 12, 2019 · 3 comments

Comments

@Zh3-H4ck
Copy link

test version:2.4.7

0x00 description

Frontaccounting is using the function clean_file_name() to eliminate '../' in the file name submitted by the user to avoid directory traversal vulnerability.

2019-11-12_103343

However, some variables do not use the function clean_file_name() in admin/inst_lang.php, which can cause attackers submit the language package containing the language code of '../'. Affter adding successfully, by deleting it, the attacker can emptied specified folder like the examples.

admin/inst_lang.php:156

2019-11-12_104009

admin/inst_lang.php:240
2019-11-12_104205

0x01 Example:empty admin folder

  1. Before clearing the admin folder
    2019-11-12_113112

  2. The administrator logs in and creates a new language pack
    2019-11-12_112847
    2019-11-12_112935

  3. Set the language code to ../admin and save it
    2019-11-12_113003

  4. Delete the language pack you just created
    2019-11-12_113206

  5. After deleting successfully, the admin folder will be emptied
    2019-11-12_113248

@Zh3-H4ck Zh3-H4ck changed the title a Directory Traversal vulnerability A Directory Traversal vulnerability Nov 12, 2019
@FrontAccountingERP
Copy link
Owner

Yes, indeed. Fix is added to the repo.

@cambell-prince
Copy link
Contributor

Yes, indeed. Fix is added to the repo.

Should this issue be closed?

@Zh3-H4ck
Copy link
Author

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants