Osclass <= 3.4.2 (ajax.php) Local File Inclusion Vulnerability
The ajax.php controller in Osclass builds a file path from a user-supplied route parameter and includes it, so an attacker could make the application load a local file of their choosing. The text shows the vulnerable code but does not demonstrate a working exploit or its outcome.
karmainsecurity.com
Published on karmainsecurity.com
The vulnerable code is located in the /oc-includes/osclass/controller/ajax.php script:
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the route parameter is used to look up a file path that is then included without validating it stays within the intended directory.
What the attacker needed
Access to the ajax endpoint
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The application takes a value from the request and uses it to decide which file on the server to load. If that value is not checked, someone can point it at a different file than intended, which is called local file inclusion. The report shows the code that does this but does not show a full attack.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.