GHSA-7mx2-7q8p-pgmw: Symfony/symfony Symfony May Allow A User Vulnerability

MODERATE
CVSS 6.5
CWE-287
Published
Advisory Summary

GHSA-7mx2-7q8p-pgmw is a MODERATE (CVSS 6.5) symfony may allow a user vulnerability (CWE-287: Improper Authentication) affecting Symfony/symfony libraries in the Packagist ecosystem. The issue involves symfony may allow a user to switch to using another user's identity. Remediation is available by upgrading affected packages to version 2.0.6.

GHSA-7mx2-7q8p-pgmw at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7mx2-7q8p-pgmw
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-287: Improper Authentication
Affected Product Symfony/symfony
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:N/I:H/A:N).

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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-7mx2-7q8p-pgmw

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

symfony/symfony fixed: 2.0.6
Upgrade symfony/symfony to 2.0.6
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 symfony/symfony

How to Check if You Are Affected

To determine whether your application is affected by GHSA-7mx2-7q8p-pgmw, inspect your project dependencies for Symfony/symfony:

inspect dependencies for symfony/symfony

Analyze the terminal output to locate any version of Symfony/symfony in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.6), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Symfony/symfony, 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

Symfony 2.0.6 has just been released. It addresses a security vulnerability in the EntityUserProvider as provided in the Doctrine bridge. If you let your users update their login/username from a form, and if you are using Doctrine as a user provider, then you are vulnerable and you should upgrade as soon as possible. The issue is that it is possible for a user to switch to another one. Here is how to reproduce it: The current user changes its username via a form to another existing username. When the form is submitted, he will have a validation error (as the username already exists) but the user object in the session will still be modified to the new username. This user from the session will be used for the next requests and so the user will be switched to this other user. The fix is to always refresh the user via the primary key (which cannot be updated via a form) instead of the username. If you cannot upgrade immediately, please apply the following patch: https://github.com/symfony/symfony/commit/9d2ab9ca9c1762

GHSA-7mx2-7q8p-pgmw Affected Symfony/symfony Versions

1 component(s)
Fixed Versions:
2.0.6
Product / Package Ecosystem Affected Versions Fixed Version
symfony/symfony
Packagist
≥ 2.0.0
< 2.0.6
2.0.6

References

Frequently Asked Questions

What is GHSA-7mx2-7q8p-pgmw?
GHSA-7mx2-7q8p-pgmw is a security vulnerability in Symfony/symfony involving Symfony may allow a user to switch to using another user's identity under CWE-287: Improper Authentication.
Which Symfony/symfony versions are affected?
Affected versions include releases prior to 2.0.6 across affected packages: symfony/symfony.
What version fixes GHSA-7mx2-7q8p-pgmw?
Upgrading to 2.0.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/symfony affected?
Yes, symfony/symfony is affected in releases prior to 2.0.6. Upgrade your dependency to 2.0.6 or later.
What is the CVSS score of GHSA-7mx2-7q8p-pgmw?
GHSA-7mx2-7q8p-pgmw has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with GHSA-7mx2-7q8p-pgmw?
GHSA-7mx2-7q8p-pgmw is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Packagist dependencies for GHSA-7mx2-7q8p-pgmw?
Run the dependency tree command: 'inspect dependencies for symfony/symfony'. 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-7mx2-7q8p-pgmw",
  "modified" : "2024-05-30T00:56:00Z",
  "published" : "2024-05-30T00:56:00Z",
  "aliases" : [ ],
  "summary" : "Symfony may allow a user to switch to using another user's identity",
  "details" : "Symfony 2.0.6 has just been released. It addresses a security vulnerability in the EntityUserProvider as provided in the Doctrine bridge.\n\nIf you let your users update their login/username from a form, and if you are using Doctrine as a user provider, then you are vulnerable and you should upgrade as soon as possible.\n\nThe issue is that it is possible for a user to switch to another one. Here is how to reproduce it: The current user changes its username via a form to another existing username. When the form is submitted, he will have a validation error (as the username already exists) but the user object in the session will still be modified to the new username. This user from the session will be used for the next requests and so the user will be switched to this other user.\n\nThe fix is to always refresh the user via the primary key (which cannot be updated via a form) instead of the username.\n\nIf you cannot upgrade immediately, please apply the following patch: https://github.com/symfony/symfony/commit/9d2ab9ca9c1762",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/commit/9d2ab9ca9c1762"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/2011-11-16.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/symfony/symfony"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/blog/security-release-symfony-2-0-6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-30T00:56:00Z",
    "nvd_published_at" : null
  }
}