CakePHP 5.3

Last reviewed Sep 24, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. PHP 8.5145 lines · 5.4K tokens
  2. CakePHP 5.3110 lines · 4.5K tokens
Total255 lines · 9.9K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 78
  • 79
  • 88
  • 89
  • 93
  • 95
  • 98
  • 117
  • 187
  • 201
  • 208
  • 209
  • 214
  • 252
  • 256
  • 295
  • 306
  • 323
  • 338
  • 340
  • 347
  • 352
  • 354
  • 362
  • 367
  • 384
  • 390
  • 409
  • 434
  • 470
  • 502
  • 522
  • 524
  • 532
  • 552
  • 601
  • 611
  • 613
  • 614
  • 639
  • 647
  • 674
  • 698
  • 732
  • 770
  • 776
  • 798
  • 799
  • 807
  • 829
  • 862
  • 915
  • 916
  • 918
  • 940
  • 942
  • 1004
  • 1275
  • 1287
  • 1333
  • 1395

Prompt Preview

Apply the PHP 8.5 baseline first. These rules target CakePHP 5.3 on PHP 8.5; the line requires PHP 8.2 or newer and officially supports PHP 8.5. Apply plugin rules only when the corresponding compatible plugin is installed.

Version and dependency scope

  • Verify the locked framework and plugin versions, including standalone cakephp/database when used. The full cakephp/cakephp package replaces its split packages at the framework version; installing both is not required.
  • Run the newest 5.3 release and take each later 5.3 security release as it ships, because CakePHP delivers fixes for a supported minor only as new patch releases of that minor. Monitor official advisories; a supported branch does not make every patch safe. Plan migration from the security-only 5.3 branch before its support ends with the release of 5.6 or an earlier major-version cutoff.

Requests, proxies, and routing

  • Put RoutingMiddleware before middleware that consumes route parameters, and run BodyParserMiddleware before body-based authentication and CSRF validation. Keep failures inside ErrorHandlerMiddleware; test route-scoped middleware as well as the application queue.
  • Enforce request-size limits before BodyParserMiddleware reads the body. Reject unsupported content types and validate the decoded shape explicitly: unknown types pass through, and valid JSON scalars are cast to arrays. Keep its default xml => false unless XML is required and separately validated.
  • Preserve webhook bytes before body parsing consumes the stream; verify the signature over those bytes, enforce