Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2018-19789

An issue was discovered in Symfony 2.7.x before 2.7.50, 2.8.x before 2.8.49, 3.x before 3.4.20, 4.0.x before 4.0.15, 4.1.x before 4.1.9, and 4.2.x before 4.2.1. When using the scalar type hint `string` in a setter method (e.g. `setName(string $name)`) of a class that's the `data_class` of a form, and when a file upload is submitted to the corresponding field instead of a normal text input, then `UploadedFile::__toString()` is called which will then return and disclose the path of the uploaded file. If combined with a local file inclusion issue in certain circumstances this could escalate it to a Remote Code Execution.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2018-19789
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 05:35 UTC · Revision 1

Source evidence

CVE-2018-19789

core-osv · Original source

Published 18 Dec 2018, 22:29 UTC

An issue was discovered in Symfony 2.7.x before 2.7.50, 2.8.x before 2.8.49, 3.x before 3.4.20, 4.0.x before 4.0.15, 4.1.x before 4.1.9, and 4.2.x before 4.2.1. When using the scalar type hint `string` in a setter method (e.g. `setName(string $name)`) of a class that's the `data_class` of a form, and when a file upload is submitted to the corresponding field instead of a normal text input, then `UploadedFile::__toString()` is called which will then return and disclose the path of the uploaded file. If combined with a local file inclusion issue in certain circumstances this could escalate it to a Remote Code Execution.

osv:CVE-2018-19789
Complete source record
{
  "id": "e3e9d2eb832c2de1db526ced858b83c897f7266b67a9271a0543d8db26a1a49d",
  "url": "https://osv.dev/vulnerability/CVE-2018-19789",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2018-19789",
    "summary": "An issue was discovered in Symfony 2.7.x before 2.7.50, 2.8.x before 2.8.49, 3.x before 3.4.20, 4.0.x before 4.0.15, 4.1.x before 4.1.9, and 4.2.x before 4.2.1. When using the scalar type hint `string` in a setter method (e.g. `setName(string $name)`) of a class that's the `data_class` of a form, and when a file upload is submitted to the corresponding field instead of a normal text input, then `UploadedFile::__toString()` is called which will then return and disclose the path of the uploaded file. If combined with a local file inclusion issue in certain circumstances this could escalate it to a Remote Code Execution.",
    "evidence": "osv:CVE-2018-19789",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2018-19789",
      "aliases": [
        "CVE-2018-19789",
        "GHSA-x3cf-w64x-4cp2"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/symfony/security-http",
              "type": "GIT",
              "events": [
                {
                  "introduced": "de2f3d51160791ef254010953dbde178fee9845f"
                },
                {
                  "fixed": "2e117acf97b059a9da3444a11ea420f1ac7c31d8"
                },
                {
                  "introduced": "a8d5dd00894f8b5e3edb897f4504c51ddc442370"
                },
                {
                  "fixed": "779def808d0d3a6d6d49da8c2f4c246ba9ed9acc"
                },
                {
                  "introduced": "d187a3f8238d5d0b7d7de3c6ba707f5f05e5ca64"
                },
                {
                  "fixed": "f8ea4e3feae37d300f661537878b28d8c7104a1d"
                },
                {
                  "introduced": "afa69c531f22fb4b9fc95017ec0e5d6c77db0c3c"
                },
                {
                  "fixed": "e42d062a4c8a7860b6f09d44e6e04f3389e1802d"
                },
                {
                  "introduced": "946668ddc1fa0279fe03e2c090ebc29881f12ddb"
                },
                {
                  "fixed": "f56f12f983148be8739112509fa8578bca3b81de"
                },
                {
                  "introduced": "34e089af7d363bd2ded8ad15f06b2b97348b97e5"
                },
                {
                  "fixed": "2c3b60af1f2884d6afbde03d1c5eefb625defed7"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.7.0"
                      },
                      {
                        "fixed": "2.7.50"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.8.0"
                      },
                      {
                        "fixed": "2.8.49"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0.0"
                      },
                      {
                        "fixed": "3.4.20"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.0.15"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.1.0"
                      },
                      {
                        "fixed": "4.1.9"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.2.0"
                      },
                      {
                        "fixed": "4.2.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.4.19",
            "v4.0.14",
            "v4.2.0-RC1",
            "v4.2.0-BETA2",
            "v4.2.0",
            "v4.1.8",
            "v2.8.48",
            "v2.7.49",
            "v2.7.48",
            "v4.1.7",
            "v3.4.18",
            "v2.8.47",
            "v4.1.6",
            "v4.1.5",
            "v2.8.46",
            "v3.4.17",
            "v3.4.16",
            "v3.4.14",
            "v4.1.4",
            "v3.4.15",
            "v2.8.45",
            "v4.1.3",
            "v2.8.44",
            "v4.1.2",
            "v4.0.13",
            "v4.0.12",
            "v3.4.13",
            "v2.8.43",
            "v2.8.42",
            "v3.4.12",
            "v4.1.1",
            "v4.1.0-BETA3",
            "v4.1.0",
            "v4.0.11",
            "v3.4.11",
            "v2.8.41",
            "v4.0.10",
            "v3.4.10",
            "v2.8.40",
            "v2.7.47",
            "v3.4.9",
            "v3.4.8",
            "v3.4.7",
            "v3.4.6",
            "v3.4.5",
            "v2.8.39",
            "v2.8.38",
            "v2.8.37",
            "v2.8.36",
            "v2.8.35",
            "v2.7.46",
            "v2.7.45",
            "v2.7.44",
            "v2.7.43",
            "v2.7.42",
            "v4.0.9",
            "v4.0.8",
            "v4.0.7",
            "v4.0.6",
            "v4.0.5",
            "v4.0.4",
            "v3.4.4",
            "v2.7.41",
            "v2.8.34",
            "v2.7.39",
            "v2.7.38",
            "v4.0.3",
            "v3.4.3",
            "v2.8.33",
            "v2.7.40",
            "v4.0.2",
            "v4.0.1",
            "v4.0.0-RC2",
            "v4.0.0",
            "v3.4.2",
            "v3.4.1",
            "v3.4.0-RC2",
            "v3.4.0-RC1",
            "v3.4.0",
            "v2.8.32",
            "v2.8.31",
            "v3.4.0-BETA4",
            "v2.8.30",
            "v2.8.29",
            "v2.7.37",
            "v2.7.36",
            "v3.4.0-BETA3",
            "v3.4.0-BETA2",
            "v3.4.0-BETA1",
            "v2.8.28",
            "v2.7.35",
            "v2.7.34",
            "v2.8.27",
            "v2.8.26",
            "v2.7.33",
            "v2.8.25",
            "v2.8.24",
            "v2.8.23",
            "v2.7.32",
            "v2.7.31",
            "v2.7.30",
            "v2.8.22",
            "v2.7.29",
            "v2.8.21",
            "v2.7.28",
            "v3.3.0-RC1",
            "v3.3.0-BETA1",
            "v2.8.20",
            "v2.7.27",
            "v2.8.19",
            "v2.7.26",
            "v2.8.18",
            "v2.7.25",
            "v2.8.17",
            "v2.8.16",
            "v2.7.24",
            "v2.7.23",
            "v2.8.15",
            "v2.7.22",
            "v3.2.0-RC1",
            "v3.2.0-BETA1",
            "v2.8.14",
            "v2.8.13",
            "v2.8.12",
            "v2.8.11",
            "v2.7.21",
            "v2.7.20",
            "v2.7.19",
            "v2.7.18",
            "v2.8.10",
            "v2.7.17",
            "v2.8.9",
            "v2.7.16",
            "v2.7.15",
            "v2.8.8",
            "v3.1.1",
            "v3.1.0-RC1",
            "v3.1.0-BETA1",
            "v3.1.0",
            "v2.8.7",
            "v2.8.6",
            "v2.7.14",
            "v2.7.13",
            "v2.8.5",
            "v2.7.12",
            "v2.8.4",
            "v2.8.3",
            "v2.7.10",
            "v2.8.2",
            "v2.7.9",
            "v2.8.1",
            "v2.7.8",
            "v3.0.0",
            "v2.8.0",
            "v2.7.7",
            "v2.7.6",
            "v2.7.5",
            "v2.7.4",
            "v2.7.3",
            "v2.7.2",
            "v2.7.1",
            "v2.7.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-19789.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/symfony/symfony",
              "type": "GIT",
              "events": [
                {
                  "introduced": "9975b1eca3de4db792a2c3e4e16f676a4aadcd46"
                },
                {
                  "fixed": "0848ce2c7f3c3ba6cece3f9457a96b176b05860c"
                },
                {
                  "introduced": "5615b92cd452cd54f1433a3f53de87c096a1107f"
                },
                {
                  "fixed": "f8ac64c075a36bedd0de43192d9601c20b99716e"
                },
                {
                  "introduced": "eb2a4f5f7a09fc4ce7a74ae883a8cf8a279614f5"
                },
                {
                  "fixed": "f6b8ddc362b1cf3fb06548693c3adbb736092412"
                },
                {
                  "introduced": "26ca7023b1c45dce951da7206ed70049267d27bc"
                },
                {
                  "fixed": "a1cce5a8b410d3a760bd86bf9250236858a7905d"
                },
                {
                  "introduced": "58261043876feb695640457c5675bb331a6eb3b7"
                },
                {
                  "fixed": "9993cdc7e9358e57a9c09d636fbe92ed9e797315"
                },
                {
                  "introduced": "7bd9a1bae87e6b2d7eba499ebf3053ff4bc3a483"
                },
                {
                  "fixed": "cadb4e8e3cb8dc472bf9f6c6a7419f0f280255b6"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.7.0"
                      },
                      {
                        "fixed": "2.7.50"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.8.0"
                      },
                      {
                        "fixed": "2.8.49"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0.0"
                      },
                      {
                        "fixed": "3.4.20"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.0.15"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.1.0"
                      },
                      {
                        "fixed": "4.1.9"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.2.0"
                      },
                      {
                        "fixed": "4.2.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.8.48",
            "v4.2.0",
            "v4.1.8",
            "v3.4.19",
            "v4.1.7",
            "v3.4.18",
            "v2.8.47",
            "v4.1.6",
            "v3.4.17",
            "v4.1.5",
            "v3.4.16",
            "v2.8.46",
            "v4.1.4",
            "v3.4.15",
            "v2.8.45",
            "v2.7.49",
            "v4.1.3",
            "v4.0.14",
            "v3.4.14",
            "v2.8.44",
            "v2.7.48",
            "v4.1.2",
            "v4.0.13",
            "v3.4.13",
            "v2.8.43",
            "v3.4.12",
            "v4.1.1",
            "v4.0.12",
            "v2.8.42",
            "v4.1.0",
            "v4.0.11",
            "v3.4.11",
            "v2.8.41",
            "v4.0.10",
            "v3.4.10",
            "v2.8.40",
            "v2.7.47",
            "v4.0.9",
            "v3.4.9",
            "v2.8.39",
            "v2.7.46",
            "v4.0.8",
            "v3.4.8",
            "v2.8.38",
            "v2.7.45",
            "v4.0.7",
            "v3.4.7",
            "v2.8.37",
            "v2.7.44",
            "v4.0.6",
            "v3.4.6",
            "v2.8.36",
            "v2.7.43",
            "v4.0.5",
            "v3.4.5",
            "v2.8.35",
            "v2.7.42",
            "v4.0.4",
            "v3.4.4",
            "v2.8.34",
            "v2.7.41",
            "v4.0.3",
            "v3.4.3",
            "v2.8.33",
            "v2.7.40",
            "v4.0.2",
            "v3.4.2",
            "v4.0.1",
            "v3.4.1",
            "v2.8.32",
            "v2.7.39",
            "v4.0.0",
            "v3.4.0",
            "v3.4.0-RC2",
            "v3.4.0-RC1",
            "v2.8.31",
            "v2.7.38",
            "v2.8.30",
            "v2.7.37",
            "v3.4.0-BETA4",
            "v2.8.29",
            "v2.7.36",
            "v3.4.0-BETA3",
            "v3.4.0-BETA2",
            "v3.4.0-BETA1",
            "v2.8.28",
            "v2.7.35",
            "v2.8.27",
            "v2.7.34",
            "v2.7.33",
            "v2.8.26",
            "v2.8.25",
            "v2.7.32",
            "v2.8.24",
            "v2.7.31",
            "v2.8.23",
            "v2.7.30",
            "v2.8.22",
            "v2.7.29",
            "v2.8.21",
            "v2.7.28",
            "v2.7.26",
            "v3.3.0-BETA1",
            "v2.8.20",
            "v2.7.27",
            "v2.8.18",
            "v2.8.19",
            "v2.7.25",
            "v2.8.17",
            "v2.7.24",
            "v2.8.16",
            "v2.7.23",
            "v2.8.15",
            "v2.7.22",
            "v2.8.14",
            "v2.7.21",
            "v3.2.0-RC1",
            "v3.2.0-BETA1",
            "v2.8.13",
            "v2.7.20",
            "v2.8.12",
            "v2.7.19",
            "v2.8.11",
            "v2.7.18",
            "v2.8.10",
            "v2.7.17",
            "v2.8.9",
            "v2.7.16",
            "v2.8.8",
            "v2.7.15",
            "v2.8.7",
            "v2.7.14",
            "v2.8.6",
            "v2.7.13",
            "v2.8.5",
            "v2.7.12",
            "v2.8.4",
            "v2.7.11",
            "v3.0.0",
            "v2.8.3",
            "v2.7.10",
            "v2.7.9",
            "v2.8.2",
            "v2.8.1",
            "v2.7.8",
            "v2.8.0",
            "v2.7.7",
            "v2.7.6",
            "v2.7.5",
            "v2.7.4",
            "v2.7.3",
            "v2.7.2",
            "v2.7.1",
            "v2.7.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-19789.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:30.714836399Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4TD3E7FZIXLVFG3SMFJPDEKPZ26TJOW7/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JZMRJ7VTHCY5AZK24G4QGX36RLUDTDKE/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OA4WVFN5FYPIXAPLWZI6N425JHHDSWAZ/",
        "https://seclists.org/bugtraq/2019/May/21",
        "https://lists.debian.org/debian-lts-announce/2019/03/msg00009.html",
        "https://www.debian.org/security/2019/dsa-4441",
        "https://symfony.com/blog/cve-2018-19789-disclosure-of-uploaded-files-full-path"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "8.0"
                  },
                  {
                    "last_affected": "8.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2018-19789",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 432643,
  "published_at": "2018-12-18T22:29:04.947+00:00"
}