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

[CWE-200] Information Disclosure due to debugging PHP code called in all context (including Production) #12

Open
March-M opened this issue Jul 7, 2022 · 0 comments
Labels
Milestone

Comments

@March-M
Copy link

March-M commented Jul 7, 2022

Hello,

Issue

There is a clear Information Disclosure vulnerability in file stock.php, line 18, 25, 26, 34, 46, 69 and 79, due to the immediate and unavoiable call to the "pg_last_error()" function in another function that will return his full content to the end user consulting the page (in our case, the die() function).

Remediation

I would recommend you to globally stop the insecure way of acceding to error generated by any DBMS request made by the application and initiating an "Environment-based" check in the code. This way, the code could know if it is deployed in a "Production-ready" environment (and will not call the said code) or a "Debug-enabled" environment (and could call the said code).
The hot-fix (that shouldn't be considered as definitive fix but that can fix the issue right now) would be to remove the information disclosure by removing entierely the use of PG_LAST_ERROR(). In any case those are available in the applicative servers logs anyways in case of need by a dev-team member.

@GnomeZworc GnomeZworc added this to the 1.3 milestone Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants