CVE-2023-47639: Api platform/core API Platform Core Can Leak Vulnerability

MODERATE
Advisory Identifier: GHSA-rfw5-cqjj-7v9r
CVSS 5.3
CWE-209
Published
Advisory Summary

CVE-2023-47639 is a MODERATE (CVSS 5.3) api platform core can leak vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting Api platform/core libraries in the Packagist ecosystem. The issue involves api platform core can leak exceptions message that may contain sensitive information. Remediation is available by upgrading affected packages to version 3.2.5.

CVE-2023-47639 at a Glance

CVE Identifier CVE-2023-47639
GHSA Identifier GHSA-rfw5-cqjj-7v9r
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-209: Generation of Error Message Containing Sensitive Information
Affected Product Api platform/core
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

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

How to Fix CVE-2023-47639

To remediate this vulnerability, upgrade all affected Api platform/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.

api-platform/core fixed: 3.2.5
Upgrade api-platform/core to 3.2.5
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 api-platform/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-47639, inspect your project dependencies for Api platform/core:

inspect dependencies for api-platform/core

Analyze the terminal output to locate any version of Api platform/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.5), 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-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In Api platform/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

### Summary Exception messages, that are not HTTP exceptions, are visible in the JSON error response. ### Details While we wanted to make our errors compatible with the [JSON Problem](https://datatracker.ietf.org/doc/html/rfc7807) specification, we ended up handling more exceptions then we did previously (introduced at https://github.com/api-platform/core/pull/5823). Instead of leaving that to Symfony, we ended up serializing errors with our normalizers which lead to not hiding the exception details. Note that the trace is hidden in production but the message is not, and the message can contain sensitive information. ### PoC At https://github.com/ili101/api-platform/tree/test3.2 it triggers an authentication exception as LDAP is not reachable. You can find the message available as a JSON response when trying to reach an endpoint. ### Impact Version 3.2 until 3.2.4 is impacted.

CVE-2023-47639 Affected Api platform/core Versions

1 component(s)
Fixed Versions:
3.2.5
Product / Package Ecosystem Affected Versions Fixed Version
api-platform/core
Packagist
≥ 3.2.0
< 3.2.5
3.2.5

References

Frequently Asked Questions

What is CVE-2023-47639?
CVE-2023-47639 is a security vulnerability in Api platform/core involving API Platform Core can leak exceptions message that may contain sensitive information under CWE-209: Generation of Error Message Containing Sensitive Information.
Which Api platform/core versions are affected?
Affected versions include releases prior to 3.2.5 across affected packages: api-platform/core.
What version fixes CVE-2023-47639?
Upgrading to 3.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is api-platform/core affected?
Yes, api-platform/core is affected in releases prior to 3.2.5. Upgrade your dependency to 3.2.5 or later.
What is the CVSS score of CVE-2023-47639?
CVE-2023-47639 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2023-47639?
CVE-2023-47639 is classified under CWE-209: Generation of Error Message Containing Sensitive Information (The product generates an error message that includes sensitive information about its environment, users, or associated data.).
How can I check Packagist dependencies for CVE-2023-47639?
Run the dependency tree command: 'inspect dependencies for api-platform/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-rfw5-cqjj-7v9r",
  "modified" : "2025-04-04T02:13:36Z",
  "published" : "2025-04-03T13:02:57Z",
  "aliases" : [ "CVE-2023-47639" ],
  "summary" : "API Platform Core can leak exceptions message that may contain sensitive information",
  "details" : "### Summary\n\nException messages, that are not HTTP exceptions, are visible in the JSON error response.\n\n### Details\n\nWhile we wanted to make our errors compatible with the [JSON Problem](https://datatracker.ietf.org/doc/html/rfc7807) specification, we ended up handling more exceptions then we did previously (introduced at https://github.com/api-platform/core/pull/5823). Instead of leaving that to Symfony, we ended up serializing errors with our normalizers which lead to not hiding the exception details. Note that the trace is hidden in production but the message is not, and the message can contain sensitive information.\n\n### PoC\n\nAt https://github.com/ili101/api-platform/tree/test3.2 it triggers an authentication exception as LDAP is not reachable. You can find the message available as a JSON response when trying to reach an endpoint.\n\n### Impact\n\nVersion 3.2 until 3.2.4 is impacted.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "api-platform/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.0"
      }, {
        "fixed" : "3.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/api-platform/core/security/advisories/GHSA-rfw5-cqjj-7v9r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-47639"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/api-platform/core/pull/5823"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/api-platform/core/commit/ba8a7e6538bccebf14c228e43a9339214c4d9201"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/api-platform/core"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-209" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-03T13:02:57Z",
    "nvd_published_at" : "2025-04-03T17:15:30Z"
  }
}