jane-php/open-api-3 flaw allows code execution in generated clients

  • jane-php
  • RCE
  • PHPDoc
  • CWE-94

Flaw in PHPDoc comment generation enables arbitrary code injection

Impacts all versions of the package prior to 7.12.0

Developers should upgrade to version 7.12.0 to mitigate the risk

The jane-php/open-api-3 library contains a remote code execution vulnerability in versions earlier than 7.12.0. An attacker can cause PHP code to run when an application instantiates a client generated from an attacker-influenced OpenAPI document.

The flaw affects generated PHPDoc comments: the library inserts header parameter names without escaping them, allowing comment text to disrupt the generated Client class. The vulnerability was verified in version 7.11.2 running on PHP 8.1 and is tracked as CWE-94, which covers improper control of code generation.

The project lists version 7.12.0 as patched. Applications using affected versions should update to 7.12.0 or later.