Skip to content

Require patched symfony/yaml (GHSA-2v3c-qxhr-7vpv) - #47

Merged
aflanagan merged 2 commits into
masterfrom
agent/patched-symfony-yaml-7cb2
Nov 3, 2026
Merged

aflanagan merged 2 commits into
masterfrom
agent/patched-symfony-yaml-7cb2

Conversation

@aflanagan

@aflanagan aflanagan commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes Dependabot alert #6, GHSA-2v3c-qxhr-7vpv (CVE-2026-109413). Deeply nested inline YAML in symfony/yaml causes unbounded recursion and crashes the process.

composer.json now requires symfony/yaml: ^5.4.54|^6.4.45|^7.4.18|^8.1.6 instead of ^4.4|^5.2|^6.0|^7.0|^8.0. Those floors are the patched releases. The 4.4 line is dropped because it has no patched release. The php constraint is now >=7.2.5, which matches what symfony/yaml 5.4.54 already requires. No SDK code, public APIs, env vars, or config changed, and no composer.lock was added.

Consumers can no longer install symfony/yaml 4.4. In practice that ends PHP 7.1 support, because Symfony 5.4 needs PHP >= 7.2.5.

Release notes

This drops PHP < 7.2.5. Release it as a minor version (for example 1.4.0) rather than a patch, because PHP 7.1 users will silently stay on 1.3.4 with the vulnerable symfony/yaml 4.4.

Tests

PHP 7.2.34 (the version CI uses), Composer 2.11.1:

  • composer validate --strict — passed
  • composer install — resolved symfony/yaml v5.4.54; composer run-script test — OK (23 tests, 36 assertions) with PHPUnit 8.5.56
  • composer update --prefer-lowest — resolved symfony/yaml v5.4.54 (PHPUnit 8.5.52); Composer reported no security vulnerability advisories; composer run-script test — OK (23 tests, 36 assertions)

After changing "php" to >=7.2.5, on PHP 7.2.34:

  • composer validate --strict — passed
  • composer install — resolved symfony/yaml v5.4.54
  • composer run-script test — OK (23 tests, 36 assertions) with PHPUnit 8.5.56

PHP 8.3.6:

  • composer validate --strict — passed
  • composer install — resolved patched symfony/yaml v6.4.49
  • composer run-script test — fatal before PHPUnit: AspectMock\Kernel::init() is incompatible with Go\Core\AspectKernel::init(): void. The same fatal happens with the previous constraint, which also resolves symfony/yaml v6.4.49 on PHP 8.3. CI runs only PHP 7.2.
Open in Web Open in Cursor 

Drop the unpatched 4.4 line and floor each supported line at 5.4.54, 6.4.45, 7.4.18, or 8.1.6.

Co-authored-by: August Flanagan <aflanagan@users.noreply.github.com>
@cursor

cursor Bot commented Nov 3, 2026

Copy link
Copy Markdown

Opus 5.5 High review of f70838bc78a40a9109effca8a08623844cbe556e

Verdict: APPROVE. I found no blocking issues. This is posted as a comment because this token cannot submit a formal GitHub review. Treat it as an approval.

What I checked

The constraint covers every patched line, and no vulnerable version is still reachable.

  • The GHSA-2v3c-qxhr-7vpv ranges for symfony/yaml are >=2.0.0 <5.4.54, >=6.0.0 <6.4.45, >=7.0.0 <7.4.18, and >=8.0.0 <8.1.6. The floors ^5.4.54|^6.4.45|^7.4.18|^8.1.6 match those first patched versions exactly.
  • The constraint also excludes 4.4, 5.0–5.3, 6.0–6.3, 7.0–7.3, and all of 8.0. None of those lines has a patched release.
  • Packagist has no 8.x release after 8.1.10, so ^8.1.6 does not admit an unpatched 8.2. The advisory says the fix was forward-ported to the 8.2 branch before any 8.2 release.
  • I ran Composer 2.11.1 against a consumer project that installs the SDK from this head:
    • The floor and latest release of each line resolve: 5.4.54 on PHP 7.2, 6.4.45 and 6.4.49 on PHP 8.1, 7.4.18 and 7.4.22 on PHP 8.2, and 8.1.6 and 8.1.10 on PHP 8.4. composer audit reports no advisories for any of them.
    • Pinning the last vulnerable version of each line is rejected by the resolver: 4.4.45, 5.4.53, 6.4.44, 7.4.17, 8.0.15, and 8.1.5.
  • For comparison, the old constraint with --prefer-lowest on PHP 7.2 resolved symfony/yaml v4.4.0, and composer audit flagged CVE-2026-109413.

The SDK's YAML usage works on 5.4 through 8.1.

  • The only call into the component is Yaml::parseFile($path) with no flags, in Client::readConfig(). That method has the same signature on 5.4, 6.4, 7.4, and 8.1.
  • Monitor::getYaml() does not use symfony/yaml. It downloads YAML text over HTTP and generateConfig() writes it to disk unparsed.
  • I smoke-tested readConfig($path, true) against all eight resolved versions above. The fixture had apiKey, apiVersion, environment, jobs, heartbeats, and checks, including inline sequences and maps. All eight produced the same parsed monitors.
  • A document with 20,000 levels of nested [:
    • With the old constraint, it crashed nothing visibly but parsed with no exception on 4.4.0 (PHP 7.2) and 4.4.45 (PHP 7.1).
    • With this PR, every resolved version throws ParseException: Maximum nesting depth of 128 exceeded.
  • composer validate --strict passes. The repo suite passes on PHP 7.2 with symfony/yaml v5.4.54: OK, 23 tests, 36 assertions. The CI build check passes on this head.

No public API change.
The diff touches only composer.json. No classes, method signatures, environment variables, or config keys change. The one behavior change is that deeply nested input now throws ParseException from readConfig() instead of exhausting the stack. That is the fix itself.

Findings

  1. Non-blocking: "php": ">=5.6" is out of date. Consider changing it to >=7.2.5, in this PR or in a follow-up.

    • The constraint was already inaccurate before this PR: symfony/yaml 4.4 needs PHP >= 7.1.3, and I confirmed that PHP 7.0 cannot install the SDK at the base commit.
    • After this PR, the real floor is PHP 7.2.5, because symfony/yaml 5.4.54 requires it. With a platform override of PHP 7.1.33, the resolver now fails with symfony/yaml v5.4.54 requires php >=7.2.5.
    • Composer already enforces the floor through the transitive requirement, so the change is metadata only and does not affect security. It does tell users and tools the truth, and leaving it as is makes PHP 5.6–7.1 look supported.
  2. Non-blocking: release as a minor version and say that PHP 7.1 is dropped.

    • This removes support for PHP 7.1, which worked with 1.3.4. The next release should be 1.4.0, not 1.3.5, and the release notes should state the PHP 7.1 drop.
    • PHP 7.1 users will not get an error. Composer will keep them on cronitor-php 1.3.4 with vulnerable symfony/yaml 4.4, so the notes should tell them to upgrade PHP.
    • This needs no code change in this PR.
  3. Non-blocking, informational: the SDK's own exposure is low. readConfig() parses a local file path that the operator supplies, either as an argument or through CRONITOR_CONFIG. It is not network input. The constraint still matters, because it decides which symfony/yaml version consumers end up with, and they may parse untrusted YAML elsewhere in their apps.

  4. Non-blocking, out of scope: CI covers only PHP 7.2. That is the only Symfony line the dev toolchain can run tests on today; the PHP 8.x failures are aspect-mock and goaop incompatibilities, as the PR description says. The 6.4, 7.4, and 8.1 lines are covered here only by the manual smoke tests above. A PHP version matrix would need the test mocking replaced first.

The package already cannot install below that floor; this only corrects the metadata.

Co-authored-by: August Flanagan <aflanagan@users.noreply.github.com>
@cursor

cursor Bot commented Nov 3, 2026

Copy link
Copy Markdown

Addressed the php constraint note: composer.json now requires >=7.2.5, matching what symfony/yaml 5.4.54 already requires. The PR description has a Release notes section. This drops PHP < 7.2.5, and the next release should be a minor (for example 1.4.0) rather than a patch, because PHP 7.1 users will silently stay on 1.3.4 with the vulnerable symfony/yaml 4.4.

Skipping the other notes:

  • A PHP 8 CI matrix is out of scope. aspect-mock breaks on PHP 8 and would need to be replaced first.
  • Cutting a release is out of scope for this PR. August cuts releases.

@cursor

cursor Bot commented Nov 3, 2026

Copy link
Copy Markdown

Opus 5.5 High re-review of 4046b33d3be92fcfea2465c34d747d62c0acbf1d

Verdict: APPROVE. I found no blocking issues. This is a comment because this token cannot submit a formal GitHub review.

What changed since f70838bc

The only code change is composer.json "php": ">=5.6" → ">=7.2.5". The PR body now has a Release notes section, and a comment explains why the PHP 8 CI matrix and release cutting are skipped.

The php constraint is correct and consistent with the symfony/yaml floors

  • These are the PHP requirements of the allowed symfony/yaml lines, from Packagist:

    Allowed line Requires PHP
    5.4.54 (the only 5.4 release allowed) >=7.2.5
    6.4.45–6.4.49 >=8.1
    7.4.18–7.4.22 >=8.2
    8.1.6–8.1.10 >=8.4.1

    The lowest of these is 7.2.5, so >=7.2.5 is exactly the floor the dependency already enforces. It adds no new restriction. Leaving the constraint without an upper bound matches the previous style; the symfony/yaml constraint already handles newer PHP versions.

  • The dev requirements fit the new floor: phpunit/phpunit ^8.5.52 requires PHP >= 7.2.

  • I resolved the head with Composer 2.11.1 and config.platform.php:

    • 7.2.4: rejected at the root, with cronitor/cronitor-php require php >=7.2.5. PHP 7.1 and older now get a clear error about the SDK itself, instead of an indirect conflict through symfony/yaml.
    • 7.2.5 and 8.0.30: resolve symfony/yaml v5.4.54.
    • 8.1.0: resolves v6.4.49.
    • 8.2.0 and 8.4.0: resolve v7.4.22. PHP 8.4.0 is below the >=8.4.1 that 8.1.x needs, so it correctly falls back to 7.4.
    • 8.4.1: resolves v8.1.10.
  • On PHP 7.2.34, composer validate --strict passes. Both composer install and composer update --prefer-lowest resolve symfony/yaml v5.4.54, and the suite passes in both cases: OK, 23 tests, 36 assertions. composer audit reports no security advisories, in both the full and --no-dev runs. It lists three abandoned dev-only packages, which were already there at f70838bc.

  • A consumer project smoke test on real PHP 7.2 (yaml 5.4.54) and PHP 8.4 (yaml 8.1.10) passes:

    • readConfig() parses the sample config correctly.
    • A document nested 20,000 levels deep throws ParseException: Maximum nesting depth of 128 exceeded.
  • The CI build check passes on this head.

Earlier notes

  • Note 1, the php constraint: resolved.
  • Note 2, release notes: resolved. The Release notes section says this drops PHP < 7.2.5, asks for a minor release such as 1.4.0, and explains that PHP 7.1 users will silently stay on 1.3.4.
  • The PHP 8 CI matrix and release cutting: skipping both is reasonable. Both were non-blocking and out of scope for this PR.

Findings

None blocking. Nothing new is non-blocking either.

Correction to my previous comment

In the nested-input bullet, I wrote that 4.4 "crashed nothing visibly but parsed with no exception". It should say: with the old constraint, symfony/yaml 4.4.0 on PHP 7.2 and 4.4.45 on PHP 7.1 parsed the 20,000-level document without throwing any exception, so nothing enforced a nesting limit. The verdict and findings in that comment are unchanged.

@aflanagan
aflanagan merged commit aa08f7a into master Nov 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants