Program: CWE-79
Project: CVE-2022-31057
Buggy source:
{
    "name": "shopware/shopware",
    "description": "Shopware is the next generation of open source e-commerce software made in Germany",
    "keywords": ["shopware", "shop"],
    "homepage": "http://www.shopware.com",
    "type": "project",
    "license": [
        "AGPL-3.0",
        "proprietary"
    ],
    "support": {
        "forum": "https://forum.shopware.com",
        "chat": "https://slack.shopware.com",
        "wiki": "https://developers.shopware.com/",
        "source": "https://github.com/shopware/shopware",
        "issues": "https://issues.shopware.com"
    },
    "require": {
        "php": "~7.4.0 || ~8.0.0 || ~8.1.0",
        "ext-ctype": "*",
        "ext-curl": "*",
        "ext-date": "*",
        "ext-dom": "*",
        "ext-gd": "*",
        "ext-hash": "*",
        "ext-iconv": "*",
        "ext-intl": "*",
        "ext-json": "*",
        "ext-mbstring": "*",
        "ext-openssl": "*",
        "ext-pdo": "*",
        "ext-pdo_mysql": "*",
        "ext-session": "*",
        "ext-simplexml": "*",
        "ext-xml": "*",
        "ext-zip": "*",
        "ext-zlib": "*",
        "lib-libxml": "*",
        "bcremer/line-reader": "1.2.0",
        "beberlei/assert": "3.3.2",
        "beberlei/doctrineextensions": "1.3.0",
        "cocur/slugify": "4.1.0",
        "doctrine/annotations": "1.13.2",
        "doctrine/cache": "1.13.0",
        "doctrine/collections": "1.6.8",
        "doctrine/common": "3.3.0",
        "doctrine/dbal": "2.13.8",
        "doctrine/event-manager": "1.1.1",
        "doctrine/orm": "2.12.2",
        "doctrine/persistence": "2.5.3",
        "elasticsearch/elasticsearch": "^7",
        "fig/link-util": "1.1.2",
        "friendsofphp/proxy-manager-lts": "1.0.12",
        "google/cloud-storage": "1.27.1",
        "guzzlehttp/guzzle": "~7.4.4",
        "guzzlehttp/psr7": "2.3.0",
        "laminas/laminas-code": "4.5.1",
        "laminas/laminas-escaper": "2.10.0",
        "league/flysystem": "~1.1.4",
        "league/flysystem-aws-s3-v3": "1.0.29",
        "monolog/monolog": "2.7.0",
        "mpdf/mpdf": "8.1.1",
        "ongr/elasticsearch-dsl": "7.2.2",
        "psr/link": "1.0.0",
        "psr/log": "1.1.4",
        "ramsey/uuid": "4.2.3",
        "setasign/fpdf": "1.8.4",
        "setasign/fpdi": "2.3.6",
        "stecman/symfony-console-completion": "0.11.0",
        "superbalist/flysystem-google-storage": "7.2.2",
        "symfony/config": "~4.4.34",
        "symfony/console": "~4.4.34",
        "symfony/dependency-injection": "~4.4.34",
        "symfony/expression-language": "~4.4.34",
        "symfony/filesystem": "~4.4.27",
        "symfony/finder": "~4.4.30",
        "symfony/form": "~4.4.34",
        "symfony/http-foundation": "~4.4.34",
        "symfony/http-kernel": "~4.4.34",
        "symfony/options-resolver": "~4.4.30",
        "symfony/polyfill-php80": "^1.23",
        "symfony/polyfill-php81": "^1.23",
        "symfony/process": "~4.4.34",
        "symfony/serializer": "~5.4.0",
        "symfony/validator": "~4.4.34",
        "symfony/web-link": "~4.4.27",
        "wikimedia/less.php": "3.1.0"
    },
    "replace": {
        "paragonie/random_compat": "*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php73": "*"
    },
    "suggest": {
        "ext-apcu": "*",
        "ext-zend-opcache": "*"
    },
    "require-dev": {
        "bamarni/composer-bin-plugin": "1.5.0",
        "behat/behat": "^3.10.0",
        "behat/gherkin": "4.9.0",
        "behat/mink": "1.10.0",
        "behat/mink-selenium2-driver": "1.6.0",
        "friends-of-behat/mink-extension": "2.6.1",
        "php-parallel-lint/php-var-dump-check": "^0.5",
        "phpspec/prophecy-phpunit": "^2.0",
        "phpstan/extension-installer": "1.1.0",
        "phpstan/phpstan": "1.7.8",
        "phpstan/phpstan-doctrine": "1.3.7",
        "phpstan/phpstan-phpunit": "1.1.1",
        "phpstan/phpstan-symfony": "1.2.2",
        "phpunit/phpunit": "^9.4",
        "sensiolabs/behat-page-object-extension": "2.3.4",
        "symfony/browser-kit": "~4.4.27",
        "symfony/dom-crawler": "~4.4.30"
    },
    "include-path": [
        "engine/Library/"
    ],
    "autoload": {
        "psr-0": {
            "Doctrine\\Common\\Proxy\\AbstractProxyFactory": "engine/Library/",
            "Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister": "engine/Library/",
            "Shopware": "engine/",
            "Enlight": "engine/Library/",
            "Zend": "engine/Library/",
            "JSMin": "engine/Library/minify/"
        },
        "files": ["engine/Shopware/Shopware.php"],
        "classmap": [
            "engine/Shopware/",
            "engine/Library/Smarty/"
        ],
        "exclude-from-classmap": [
            "engine/Shopware/Plugins/Community/",
            "engine/Shopware/Plugins/Local/",
            "custom/plugins/"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Shopware\\Behat\\ShopwareExtension\\": "tests/Mink/Extension/ShopwareExtension",
            "Shopware\\Tests\\Mink\\": "tests/Mink/features/bootstrap",
            "Shopware\\Tests\\": "tests/"
        }
    },
    "config": {
        "autoloader-suffix": "Shopware",
        "optimize-autoloader": true,
        "sort-packages": true,
        "allow-plugins": {
            "composer/package-versions-deprecated": true,
            "phpstan/extension-installer": true,
            "bamarni/composer-bin-plugin": true
        }
    },
    "scripts": {
        "cs-check": "make check-php-cs-fixer",
        "cs-fix": "make fix-code-style",
        "post-install-cmd": "./build/composer-post-install-cmd.sh",
        "post-update-cmd": "./build/composer-post-update-cmd.sh",
        "test": "phpunit -c tests/ --colors=always",
        "test-unit": "phpunit -c tests/phpunit_unit.xml.dist --colors=always"
    }
}


Fixed version (ground truth):
{
    "name": "shopware/shopware",
    "description": "Shopware is the next generation of open source e-commerce software made in Germany",
    "keywords": ["shopware", "shop"],
    "homepage": "http://www.shopware.com",
    "type": "project",
    "license": [
        "AGPL-3.0",
        "proprietary"
    ],
    "support": {
        "forum": "https://forum.shopware.com",
        "chat": "https://slack.shopware.com",
        "wiki": "https://developers.shopware.com/",
        "source": "https://github.com/shopware/shopware",
        "issues": "https://issues.shopware.com"
    },
    "require": {
        "php": "~7.4.0 || ~8.0.0 || ~8.1.0",
        "ext-ctype": "*",
        "ext-curl": "*",
        "ext-date": "*",
        "ext-dom": "*",
        "ext-gd": "*",
        "ext-hash": "*",
        "ext-iconv": "*",
        "ext-intl": "*",
        "ext-json": "*",
        "ext-mbstring": "*",
        "ext-openssl": "*",
        "ext-pdo": "*",
        "ext-pdo_mysql": "*",
        "ext-session": "*",
        "ext-simplexml": "*",
        "ext-xml": "*",
        "ext-zip": "*",
        "ext-zlib": "*",
        "lib-libxml": "*",
        "bcremer/line-reader": "1.2.0",
        "beberlei/assert": "3.3.2",
        "beberlei/doctrineextensions": "1.3.0",
        "cocur/slugify": "4.1.0",
        "doctrine/annotations": "1.13.2",
        "doctrine/cache": "1.13.0",
        "doctrine/collections": "1.6.8",
        "doctrine/common": "3.3.0",
        "doctrine/dbal": "2.13.8",
        "doctrine/event-manager": "1.1.1",
        "doctrine/orm": "2.12.2",
        "doctrine/persistence": "2.5.3",
        "elasticsearch/elasticsearch": "^7",
        "fig/link-util": "1.1.2",
        "friendsofphp/proxy-manager-lts": "1.0.12",
        "google/cloud-storage": "1.27.1",
        "guzzlehttp/guzzle": "~7.4.4",
        "guzzlehttp/psr7": "2.3.0",
        "laminas/laminas-code": "4.5.1",
        "laminas/laminas-escaper": "2.10.0",
        "league/flysystem": "~1.1.4",
        "league/flysystem-aws-s3-v3": "1.0.29",
        "monolog/monolog": "2.7.0",
        "mpdf/mpdf": "8.1.1",
        "ongr/elasticsearch-dsl": "7.2.2",
        "psr/link": "1.0.0",
        "psr/log": "1.1.4",
        "ramsey/uuid": "4.2.3",
        "setasign/fpdf": "1.8.4",
        "setasign/fpdi": "2.3.6",
        "stecman/symfony-console-completion": "0.11.0",
        "superbalist/flysystem-google-storage": "7.2.2",
        "symfony/config": "~4.4.34",
        "symfony/console": "~4.4.34",
        "symfony/dependency-injection": "~4.4.34",
        "symfony/expression-language": "~4.4.34",
        "symfony/filesystem": "~4.4.27",
        "symfony/finder": "~4.4.30",
        "symfony/form": "~4.4.34",
        "symfony/http-foundation": "~4.4.34",
        "symfony/http-kernel": "~4.4.34",
        "symfony/options-resolver": "~4.4.30",
        "symfony/polyfill-php80": "^1.23",
        "symfony/polyfill-php81": "^1.23",
        "symfony/process": "~4.4.34",
        "symfony/serializer": "~5.4.0",
        "symfony/validator": "~4.4.34",
        "symfony/web-link": "~4.4.27",
        "voku/anti-xss": "~4.1.39",
        "wikimedia/less.php": "3.1.0"
    },
    "replace": {
        "paragonie/random_compat": "*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php73": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-mbstring": "*"
    },
    "suggest": {
        "ext-apcu": "*",
        "ext-zend-opcache": "*"
    },
    "require-dev": {
        "bamarni/composer-bin-plugin": "1.5.0",
        "behat/behat": "^3.10.0",
        "behat/gherkin": "4.9.0",
        "behat/mink": "1.10.0",
        "behat/mink-selenium2-driver": "1.6.0",
        "friends-of-behat/mink-extension": "2.6.1",
        "php-parallel-lint/php-var-dump-check": "^0.5",
        "phpspec/prophecy-phpunit": "^2.0",
        "phpstan/extension-installer": "1.1.0",
        "phpstan/phpstan": "1.7.8",
        "phpstan/phpstan-doctrine": "1.3.7",
        "phpstan/phpstan-phpunit": "1.1.1",
        "phpstan/phpstan-symfony": "1.2.2",
        "phpunit/phpunit": "^9.4",
        "sensiolabs/behat-page-object-extension": "2.3.4",
        "symfony/browser-kit": "~4.4.27",
        "symfony/dom-crawler": "~4.4.30"
    },
    "include-path": [
        "engine/Library/"
    ],
    "autoload": {
        "psr-0": {
            "Doctrine\\Common\\Proxy\\AbstractProxyFactory": "engine/Library/",
            "Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister": "engine/Library/",
            "Shopware": "engine/",
            "Enlight": "engine/Library/",
            "Zend": "engine/Library/",
            "JSMin": "engine/Library/minify/"
        },
        "files": ["engine/Shopware/Shopware.php"],
        "classmap": [
            "engine/Shopware/",
            "engine/Library/Smarty/"
        ],
        "exclude-from-classmap": [
            "engine/Shopware/Plugins/Community/",
            "engine/Shopware/Plugins/Local/",
            "custom/plugins/"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Shopware\\Behat\\ShopwareExtension\\": "tests/Mink/Extension/ShopwareExtension",
            "Shopware\\Tests\\Mink\\": "tests/Mink/features/bootstrap",
            "Shopware\\Tests\\": "tests/"
        }
    },
    "config": {
        "autoloader-suffix": "Shopware",
        "optimize-autoloader": true,
        "sort-packages": true,
        "allow-plugins": {
            "composer/package-versions-deprecated": true,
            "phpstan/extension-installer": true,
            "bamarni/composer-bin-plugin": true
        }
    },
    "scripts": {
        "cs-check": "make check-php-cs-fixer",
        "cs-fix": "make fix-code-style",
        "post-install-cmd": "./build/composer-post-install-cmd.sh",
        "post-update-cmd": "./build/composer-post-update-cmd.sh",
        "test": "phpunit -c tests/ --colors=always",
        "test-unit": "phpunit -c tests/phpunit_unit.xml.dist --colors=always"
    }
}