CVE-2023-49283: Microsoft/microsoft graph core Test Code Vulnerability

MODERATE
Advisory Identifier: GHSA-mhhp-c3cm-2r86
CVSS 5.4
CWE-200
Published
Advisory Summary

CVE-2023-49283 is a MODERATE (CVSS 5.4) test code vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Microsoft/microsoft graph core libraries in the Packagist ecosystem. The issue involves test code in published microsoft-graph-core package exposes phpinfo(). Remediation is available by upgrading affected packages to version 2.0.2.

CVE-2023-49283 at a Glance

CVE Identifier CVE-2023-49283
GHSA Identifier GHSA-mhhp-c3cm-2r86
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Microsoft/microsoft graph core
Package Ecosystem Packagist
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2023-49283

To remediate this vulnerability, upgrade all affected Microsoft/microsoft graph core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

microsoft/microsoft-graph-core fixed: 2.0.2
Upgrade microsoft/microsoft-graph-core to 2.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for microsoft/microsoft-graph-core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-49283, inspect your project dependencies for Microsoft/microsoft graph core:

inspect dependencies for microsoft/microsoft-graph-core

Analyze the terminal output to locate any version of Microsoft/microsoft graph core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.2), 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 core, 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

### Impact The Microsoft Graph Core 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-core/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. ### Patches This problem has been patched in version 2.0.2. ### Workarounds 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-core/tests/GetPhpInfo.php file - remove access to the /vendor directory will remove this vulnerability - disable the phpinfo function ### References For more information about the vulnerability and the patch, users can refer to the following sources: - https://nvd.nist.gov/vuln/detail/CVE-2023-49103 - https://github.com/microsoftgraph/msgraph-beta-sdk-php/compare/2.0.0...2.0.1 - https://github.com/microsoftgraph/msgraph-sdk-php-core/compare/2.0.1...2.0.2 - https://github.com/microsoftgraph/msgraph-sdk-php/compare/1.109.0...1.109.1 - https://owncloud.com/security-advisories/disclosure-of-sensitive-credentials-and-configuration-in-containerized-deployments/

CVE-2023-49283 Affected Microsoft/microsoft graph core Versions

1 component(s)
Fixed Versions:
2.0.2
Product / Package Ecosystem Affected Versions Fixed Version
microsoft/microsoft-graph-core
Packagist
< 2.0.2
2.0.2

References

Frequently Asked Questions

What is CVE-2023-49283?
CVE-2023-49283 is a security vulnerability in Microsoft/microsoft graph core involving Test code in published microsoft-graph-core package exposes phpinfo() under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Microsoft/microsoft graph core versions are affected?
Affected versions include releases prior to 2.0.2 across affected packages: microsoft/microsoft-graph-core.
What version fixes CVE-2023-49283?
Upgrading to 2.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is microsoft/microsoft-graph-core affected?
Yes, microsoft/microsoft-graph-core is affected in releases prior to 2.0.2. Upgrade your dependency to 2.0.2 or later.
What is the CVSS score of CVE-2023-49283?
CVE-2023-49283 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L.
What CWE is associated with CVE-2023-49283?
CVE-2023-49283 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Packagist dependencies for CVE-2023-49283?
Run the dependency tree command: 'inspect dependencies for microsoft/microsoft-graph-core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mhhp-c3cm-2r86",
  "modified" : "2024-02-07T16:17:14Z",
  "published" : "2023-12-05T22:46:57Z",
  "aliases" : [ "CVE-2023-49283" ],
  "summary" : "Test code in published microsoft-graph-core package exposes phpinfo()",
  "details" : "### Impact\n\nThe Microsoft Graph Core 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-core/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 version 2.0.2.\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-core/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-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/microsoftgraph/msgraph-sdk-php-core/security/advisories/GHSA-mhhp-c3cm-2r86"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-49103"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-49283"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/microsoft/microsoft-graph-core/CVE-2023-49283.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-core"
  }, {
    "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:57Z",
    "nvd_published_at" : "2023-12-05T23:15:07Z"
  }
}