View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032980 | mantisbt | security | public | 2023-09-30 20:49 | 2023-10-24 14:09 |
Reporter | PR_CSO | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 2.25.7 | ||||
Summary | 0032980: Information leakage: summary on bug revision note | ||||
Description | Accessing the page bug_revision_view_page.php as authenticated user but without permissions on any project, I can still see "summary" when I guess a valid bugnote_id. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
PR_CSO, I was not able to reproduce your problem with a fresh install of 2.25.7. (used two private projects and a new user with reporter access level) |
|
As a side note, I set the "View Status" of the issue to "private", so there is no need to set your notes to private as long as they do not contain private information. Do you have an account with "Administrator" rights?
So you have access to the project?
|
|
Without having a reproducible workflow that starts from a fresh installation of MantisBT 2.25.7, there is hardly a chance to find out what is going on. You need administrative access to the affected installation and access to the file system (maybe also to the database) to check all configuration options, project and user settings. |
|
If the REST API is enabled, you can try to access an endpoint and look for the As a side note (and potential information disclosure issue, to follow-up separately), I don't think this header should be set if |
|
Request: Response: I already requested to have the "bug_revision_view_page.php" file from the installation, but I guess it would be the right one. P.S. |
|
Some more evidences retrieved from the end user. |
|
Thanks for confirming the version, but as atrol explained (0032980:0068149), the problem you describe is not reproducible. |
|
I got the file retrieved from the installation, and it has the "# Make sure user is allowed to view revisions" block, so should be the right version. The end user is available for a Teams meet today from 14 to 15 CEST (UTC+2) |
|
I had a call with the end user and we noticed that the vulnerability seems to be only on projects with "obsolete" state and not if the state is "development". Please let me know, otherwise I'll try to organize another meet when you're available. |
|
I'm sorry, but at least for me (and probably for atrol and vboctor too) that will not be possible. We support MantisBT in our spare time, don't get paid for it, and to be honest there is no way I would take time off from my day job to provide this kind of assistance. As mentioned previously, we are currently unable to reproduce the issue. That does not mean it does not exist of course, but we need you or your client to provide a reproducible test case (step-by-step instructions, including system setup).
I'm afraid the project status (obsolete/development) is a red herring, the project_status_enum_string is not used in access checks. More likely there are some project-specific settings in your client's system configuration that are different from the globally-defined values and/or the project where the vulnerability exists. In this context, you should check:
If you have some PHP knowledge, you can have a closer look at access_can_view_bugnote_revision() in core/access_api.php, and debug/trace the code to understand why it's not returning false as it should. |
|
Hello, I am sorry for the misunderstanding, I am not familiar with the project at all, and could not imagine that there was not some sort of developer funding within it. Thank you very much P.S. |
|
Configuration settings are defined in Unfortunately, there is no MantisBT setting that will give you any useful logging to troubleshoot this specific issue without touching the code. PHP can be configured to run in debug mode, which would allow to trace execution step by step, but this is not something that you would want to do in a production environment. Maybe they have a test env that can be used for that purpose. Anonymizing sensitive data may be another option. I may be wrong of course, but I don't think the problem here is data driven. It's most likely caused by configuration (metadata), so the key is to find out what config(s) to set in order to build a reproducible case on a fresh installation. Start with checking the indications I gave you in 0032980:0068176. |
|
I know they had a 2.1.0 installation and than upgraded to 2.25.7. I also know that the issue is only on older projects. What about the paid consultancy, is it something you would like to manage? |
|
I don't have time to go over the differences in code that could have an impact on this, but to be honest I doubt it.
I sent you an email last night, didn't you get it ? |
|
Yes, I'll write you back soon. |
|
As part of the upgrade process, not following the upgrade instructions from the Admin Guide the user replaced the 2.25.7 config_defaults_inc.php file with the old version from 2.1.0. This caused some config options to be undefined, including $g_bug_revision_view_threshold which is the problem's root cause here. With increased log levels ( The MantisBT source code should never be modified, this is not supported. We could upgrade the WARNING to ERROR to make this kind of problem more obvious, but considering that these are normally caught at development time and this is really a corner case, I don't think it's really worth it. |
|
Resolving the issue as "no change required" as the problem was caused by an incorrect upgrade. |
|
You might consider putting some sort of integrity check, on the version of the most vital files, such as the "config_defaults_inc.php." It remains to report version-related information leakage (fingerprinting), via /mantisbt/api/rest/. Since I did not identify it myself, I imagine dregad will handle it directly. Best regards and thanks for the assistance Paolo |
|
Thanks for the reminder. This was discussed internally, but I forgot to create an issue to formally track it. See 0033017.
Such integrity check was actually implemented in the past, but unfortunately following a server migration some of the source code got lost and was never recovered, and the developer who worked on it left the project, so it's there but currently disabled. You may see the remnants of it here:
I'll discuss it with the team. |
|