Skip to content

v3.15.3

Choose a tag to compare

@alies-dev alies-dev released this 25 Jul 12:15
24d7e08

Taint-analysis precision for static where()/whereNot() calls and redirect responses (Psalm 6 line), ported from the paired v4.15.3 release.

Fixes

  1. Fix TaintedSql false positives and a false negative on where()/whereNot() static receivers and nested-condition array values (#1300).
 class ConcreteOverrideModel extends Model {
     /** @psalm-taint-sink sql $column */
     public static function where(mixed $column): void {}
 }

 $term = (string) $request->input('term');
-ConcreteOverrideModel::where([['name', '=', $term]]); // silent (false negative, own sink stripped)
+ConcreteOverrideModel::where([['name', '=', $term]]); // TaintedSql

 Article::where([['name', '=', $request->keyword]]);
-// TaintedSql (false positive) -- mixed value failed the outer position's scalar gate
+// clean -- inner nested-condition value strips unconditionally on a real Model receiver
  1. Fix TaintedSSRF false positive on redirect() and Redirect/ResponseFactory redirect responses. A redirect is a header/open-redirect sink, not a server-side request, so it now reports the correct sink kind (#1313).
-return redirect($request->input('next')); // TaintedSSRF (wrong sink kind)
+return redirect($request->input('next')); // TaintedHeader

Full Changelog: v3.15.2...v3.15.3