CVE-2023-49282
Test code in published microsoft-graph package exposes phpinfo()
Check your servers for CVE-2023-49282
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-49282 affects msgraph-sdk-php, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
msgraph-sdk-php is the Microsoft Graph Library for PHP. The 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. The vulnerability affects the GetPhpInfo.php script of the PHP SDK which contains a call to the phpinfo() function. This 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. The 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. This problem has been patched in versions 1.109.1 and 2.0.0-RC5. If an immediate deployment with the updated vendor package is not available, you can perform the following temporary workarounds: delete the `vendor/microsoft/microsoft-graph/tests/GetPhpInfo.php` file, remove access to the `/vendor` directory, or disable the phpinfo function.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality low, integrity none, availability low: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 2.54%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 85.7% of all scored CVEs. Scores of 29 Nov 2026.
Weakness
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| msgraph-sdk-php |
affected >= 1.16.0, < 1.109.1 affected >= 2.0.0-RC1, < 2.0.1
|
Is my server affected?
Find the installed version of msgraph-sdk-php and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i msgraph-sdk-php
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-49282 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-49282RHEL, Rocky, Alma, Fedora
rpm -q msgraph-sdk-php
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-49282Alpine
apk list --installed | grep -i msgraph-sdk-phpWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-49282
trivy image --scanners vuln IMAGE | grep CVE-2023-49282
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://github.com/microsoftgraph/msgraph-sdk-php/security/advisories/GHSA-cgwq-6prq-8h9q github.com
Other references
- https://github.com/microsoftgraph/msgraph-beta-sdk-php/compare/2.0.0...2.0.1 github.com
- https://github.com/microsoftgraph/msgraph-sdk-php-core/compare/2.0.1...2.0.2 github.com
- https://github.com/microsoftgraph/msgraph-sdk-php/compare/1.109.0...1.109.1 github.com
- https://owncloud.com/security-advisories/disclosure-of-sensitive-credentials-and-configuration-in-containerized-deployments/ owncloud.com
Source: the record CVE-2023-49282 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse