CVE-2023-49282: Microsoft/microsoft graph Test Code Vulnerability
MODERATECVE-2023-49282 is a MODERATE (CVSS 5.4) test code vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Microsoft/microsoft graph libraries in the Packagist ecosystem. The issue involves test code in published microsoft-graph package exposes phpinfo(). Remediation is available by upgrading affected packages to version 1.109.1, 2.0.1.
CVE-2023-49282 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L).
How to Fix CVE-2023-49282
To remediate this vulnerability, upgrade all affected Microsoft/microsoft graph dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade microsoft/microsoft-graph to 1.109.1
Upgrade microsoft/microsoft-graph to 2.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for microsoft/microsoft-graph
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-49282, inspect your project dependencies for Microsoft/microsoft graph:
inspect dependencies for microsoft/microsoft-graph
Analyze the terminal output to locate any version of Microsoft/microsoft graph in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.109.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Microsoft/microsoft graph, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-49282 Affected Microsoft/microsoft graph Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
microsoft/microsoft-graph
|
Packagist |
≥ 1.16.0
< 1.109.1
|
1.109.1
|
|
microsoft/microsoft-graph
|
Packagist |
≥ 2.0.0-RC1
< 2.0.1
|
2.0.1
|
References
Frequently Asked Questions
What is CVE-2023-49282?
Which Microsoft/microsoft graph versions are affected?
What version fixes CVE-2023-49282?
Is microsoft/microsoft-graph affected?
What is the CVSS score of CVE-2023-49282?
What CWE is associated with CVE-2023-49282?
How can I check Packagist dependencies for CVE-2023-49282?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cgwq-6prq-8h9q",
"modified" : "2024-02-07T16:16:53Z",
"published" : "2023-12-05T22:46:25Z",
"aliases" : [ "CVE-2023-49282" ],
"summary" : "Test code in published microsoft-graph package exposes phpinfo()",
"details" : "### Impact\n\nThe Microsoft Graph PHP SDK published packages which contained test code that enabled the use of the phpInfo() function from any application that could access and execute the file at vendor/microsoft/microsoft-graph/tests/GetPhpInfo.php. The phpInfo function exposes system information. \n\nThe vulnerability affects the GetPhpInfo.php script of the PHP SDK which contains a call to the phpinfo() function. \n\nThis vulnerability requires a misconfiguration of the server to be present so it can be exploited. For example, making the PHP application’s /vendor directory web accessible. \n\nThe combination of the vulnerability and the server misconfiguration would allow an attacker to craft an HTTP request that executes the phpinfo() method. The attacker would then be able to get access to system information like configuration, modules, and environment variables and later on use the compromised secrets to access additional data.\n\n### Patches\n\nThis problem has been patched in versions 1.109.1 and 2.0.0-RC5.\n\n### Workarounds\n\nIf an immediate deployment with the updated vendor package is not available, you can perform the following temporary workarounds:\n- delete the vendor/microsoft/microsoft-graph/tests/GetPhpInfo.php file\n- remove access to the /vendor directory will remove this vulnerability\n- disable the phpinfo function\n\n### References\nFor more information about the vulnerability and the patch, users can refer to the following sources: \n\n- https://nvd.nist.gov/vuln/detail/CVE-2023-49103\n- https://github.com/microsoftgraph/msgraph-beta-sdk-php/compare/2.0.0...2.0.1 \n- https://github.com/microsoftgraph/msgraph-sdk-php-core/compare/2.0.1...2.0.2 \n- https://github.com/microsoftgraph/msgraph-sdk-php/compare/1.109.0...1.109.1 \n- https://owncloud.com/security-advisories/disclosure-of-sensitive-credentials-and-configuration-in-containerized-deployments/ ",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "microsoft/microsoft-graph"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.16.0"
}, {
"fixed" : "1.109.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "microsoft/microsoft-graph"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0-RC1"
}, {
"fixed" : "2.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/microsoftgraph/msgraph-sdk-php/security/advisories/GHSA-cgwq-6prq-8h9q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-49282"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/microsoft/microsoft-graph/CVE-2023-49282.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoftgraph/msgraph-beta-sdk-php/compare/2.0.0...2.0.1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/microsoftgraph/msgraph-sdk-php"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoftgraph/msgraph-sdk-php-core/compare/2.0.1...2.0.2"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoftgraph/msgraph-sdk-php/compare/1.109.0...1.109.1"
}, {
"type" : "WEB",
"url" : "https://owncloud.com/security-advisories/disclosure-of-sensitive-credentials-and-configuration-in-containerized-deployments"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-05T22:46:25Z",
"nvd_published_at" : "2023-12-05T23:15:07Z"
}
}