<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>PHP Hub</title><description>Security briefs and practical lessons for PHP, Laravel and WordPress, written by Raghav and checked against official sources.</description><link>https://php-hub-rj.vercel.app/</link><item><title>PHP security this week (16–23 Nov 2026)</title><link>https://php-hub-rj.vercel.app/briefs/2026-11-23-php-security-this-week/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/briefs/2026-11-23-php-security-this-week/</guid><description>Five PHP advisories worth a look: Jane OpenAPI codegen RCE, Silverstripe framework RCE, Paymenter (Laravel/Livewire) unauthenticated method call, Contao admin self-grant, and a SimpleSAMLphp SAML2 signature bypass. None is on CISA KEV.</description><pubDate>Sun, 22 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>composer</category><category>weekly</category><category>silverstripe</category><category>contao</category><category>paymenter</category></item><item><title>Laravel exists and unique Rules: Two Advisories and How to Validate Safely</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-23-laravel-exists-unique-validation-advisories/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-23-laravel-exists-unique-validation-advisories/</guid><description>Laravel published two moderate advisories for laravel/framework on 18 Nov 2026: Rule::exists()/Rule::unique() fluent where() values can be read as predicates, and exists can be bypassed by integer or boolean JSON input on MySQL/MariaDB. Upgrade to 12.73.0 or 13.43.0, add string rules before exists/unique, and keep independent ownership checks.</description><pubDate>Sun, 22 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>validation</category><category>advisory</category></item><item><title>Logging Without Leaking Secrets or PII in PHP and Laravel</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-22-php-laravel-logging-without-leaking-pii/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-22-php-laravel-logging-without-leaking-pii/</guid><description>Do not log $request-&gt;all(), Authorization headers, cookies or passwords. Use Laravel&apos;s Log facade with a request id from Log::withContext() or shareContext(), and run context arrays through a redaction helper before writing them. Logs are often copied to Slack, files and log vendors — a secret in a log is a secret out of your app.</description><pubDate>Sat, 21 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>logging</category><category>privacy</category></item><item><title>Keeping Secrets Out of Git: .env, APP_KEY and APP_DEBUG</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-21-laravel-secrets-env-app-key-debug-mode/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-21-laravel-secrets-env-app-key-debug-mode/</guid><description>Laravel&apos;s documentation says the .env file should not be committed to source control. Keep APP_KEY and database credentials in the environment, set APP_DEBUG to false in production, and after config:cache only call env() from config files. If you need a file in git, use php artisan env:encrypt and store the decryption key in a password manager.</description><pubDate>Fri, 20 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>secrets</category><category>environment</category></item><item><title>PHP Deserialization Risks: Why unserialize Is Unsafe for User Input</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-20-php-unserialize-deserialization-risks/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-20-php-unserialize-deserialization-risks/</guid><description>The PHP manual warns: do not pass untrusted input to unserialize(), regardless of allowed_classes. Unserialization can instantiate objects and run code during autoloading. Prefer json_encode() / json_decode() for data you accept from users, and treat allowed_classes as a hardening step for trusted payloads only.</description><pubDate>Thu, 19 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>security</category><category>unserialize</category><category>deserialization</category><category>json</category></item><item><title>WordPress Nonces and Capability Checks: CSRF Is Not Authorization</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-19-wordpress-nonces-current-user-can/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-19-wordpress-nonces-current-user-can/</guid><description>WordPress nonces help prevent CSRF, but they are not one-time tokens and they are not authorization. Verify a nonce with check_admin_referer() or wp_verify_nonce(), and separately call current_user_can() in the request handler. Official documentation says you should always assume a nonce can be compromised.</description><pubDate>Wed, 18 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>wordpress</category><category>security</category><category>nonces</category><category>capabilities</category></item><item><title>Signed URLs in Laravel: signedRoute, Expiry and the signed Middleware</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-17-laravel-signed-urls-temporary-signature/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-17-laravel-signed-urls-temporary-signature/</guid><description>Laravel signed URLs append an HMAC to the query string so the path and query cannot be altered unnoticed. Prefer URL::temporarySignedRoute() with an expiry, protect the route with the signed middleware, and read parameters with $request-&gt;query() because the request body is not signed.</description><pubDate>Mon, 16 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>signed-urls</category><category>urls</category></item><item><title>PHP security this week (9–16 Nov 2026)</title><link>https://php-hub-rj.vercel.app/briefs/2026-11-16-php-security-this-week/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/briefs/2026-11-16-php-security-this-week/</guid><description>Quiet week in PHP: Laravel concurrency output injection (low), two medium code16/sharp flaws, and a FileGator upload/batch-download pair. None is on CISA KEV.</description><pubDate>Sun, 15 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>composer</category><category>weekly</category><category>sharp</category><category>filegator</category></item><item><title>Encryption in Laravel and PHP: Crypt, APP_KEY and sodium</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-16-encryption-laravel-crypt-app-key-sodium/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-16-encryption-laravel-crypt-app-key-sodium/</guid><description>Laravel&apos;s Crypt::encryptString() uses OpenSSL AES-256-CBC and signs every value with a MAC. Generate APP_KEY with php artisan key:generate, never commit it, and use APP_PREVIOUS_KEYS when you rotate. In plain PHP, use the sodium extension&apos;s documented secretbox API rather than a home-grown cipher.</description><pubDate>Sun, 15 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>encryption</category><category>cryptography</category></item><item><title>Auditing PHP Dependencies with composer audit</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-15-composer-audit-php-dependency-security/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-15-composer-audit-php-dependency-security/</guid><description>Run composer audit (and composer audit --locked in CI) against the Packagist advisory API. The command exits 0 when it finds no issues and 1 when packages match a policy, including security advisories, abandoned packages or malware flags. composer update already runs an audit unless you pass --no-audit.</description><pubDate>Sat, 14 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>composer</category><category>security</category><category>dependencies</category><category>supply-chain</category></item><item><title>Path Traversal in PHP and Laravel: Safe File Paths</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-14-path-traversal-php-laravel-realpath/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-14-path-traversal-php-laravel-realpath/</guid><description>Never concatenate request input onto a filesystem path. Reject null bytes, backslashes and absolute paths, resolve the result with realpath(), and allow the file only when it stays inside a known base directory. realpath() returns false when the path does not exist, so new files need a parent-directory check.</description><pubDate>Fri, 13 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>path-traversal</category><category>filesystem</category></item><item><title>SSRF in PHP HTTP Clients: Don&apos;t Fetch User-Supplied URLs</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-13-ssrf-php-http-clients-guzzle-laravel-http/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-13-ssrf-php-http-clients-guzzle-laravel-http/</guid><description>SSRF happens when your server fetches a URL an attacker chose. Don&apos;t pass request input to file_get_contents(), cURL or Laravel&apos;s Http::get(). Allow-list the hosts you intend to call, require HTTPS, reject URLs with credentials, and disable redirects.</description><pubDate>Thu, 12 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>ssrf</category><category>http-client</category></item><item><title>Rate Limiting Login in Laravel: throttle, RateLimiter and Fortify</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-12-laravel-login-rate-limiting-throttle-fortify/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-12-laravel-login-rate-limiting-throttle-fortify/</guid><description>Define named Laravel rate limiters with RateLimiter::for() and Limit::perMinute()-&gt;by(), attach them with the throttle middleware (HTTP 429 when exceeded), and keep Fortify&apos;s default login throttle: 5 attempts per 60 seconds, keyed by username and IP.</description><pubDate>Wed, 11 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>rate-limiting</category><category>authentication</category></item><item><title>Open Redirects in PHP and Laravel: Validating ?next= and Return URLs</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-11-open-redirects-php-laravel-safe-next-url/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-11-open-redirects-php-laravel-safe-next-url/</guid><description>Laravel&apos;s redirect()-&gt;to() returns full URLs like https://evil.example or //evil.example unchanged, so redirect($request-&gt;input(&apos;next&apos;)) is an open redirect. Accept only single-slash local paths (or an explicit host allowlist), reject backslashes and control characters, and fall back to a safe default.</description><pubDate>Tue, 10 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>redirects</category><category>owasp</category></item><item><title>Secure Random Tokens in PHP and Laravel: random_bytes, random_int and Str::random</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-10-secure-random-tokens-php-laravel-random-bytes/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-10-secure-random-tokens-php-laravel-random-bytes/</guid><description>uniqid(), mt_rand() and rand() are not for secrets. Use random_bytes() or random_int() (or Laravel&apos;s Str::random, which uses random_bytes), store a hash of the token instead of the token, and compare with hash_equals().</description><pubDate>Mon, 09 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>tokens</category><category>randomness</category></item><item><title>PHP security this week (2–9 Nov 2026)</title><link>https://php-hub-rj.vercel.app/briefs/2026-11-09-php-security-this-week/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/briefs/2026-11-09-php-security-this-week/</guid><description>The short version: four items worth your attention. Two are already on CISA&apos;s &quot;exploited in the wild&quot; list (a WordPress core flaw and the PHP &quot;PHP2Shell&quot; pair). The rest are routine…</description><pubDate>Sun, 08 Nov 2026 18:30:00 GMT</pubDate><category>wordpress</category><category>php</category><category>php-core</category><category>symfony</category><category>composer</category><category>weekly</category><category>kev</category></item><item><title>Session Security in PHP and Laravel: Cookie Flags, Strict Mode and ID Regeneration</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-09-php-laravel-session-security-cookies-regeneration/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-09-php-laravel-session-security-cookies-regeneration/</guid><description>Plain PHP ships with session.use_strict_mode, cookie_httponly and cookie_secure all off. Turn them on, regenerate the ID after login, and in Laravel set SESSION_SECURE_COOKIE and keep the regenerate/invalidate calls in your auth flow.</description><pubDate>Sun, 08 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>sessions</category><category>cookies</category></item><item><title>Safe File Uploads in PHP and Laravel: Validation, Storage and Serving</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-08-safe-file-uploads-php-laravel-validation-storage/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-08-safe-file-uploads-php-laravel-validation-storage/</guid><description>Treat the client filename, extension and Content-Type as untrusted, detect the type from file contents, store under a generated name on a non-public disk, and never let the web server execute an upload as PHP.</description><pubDate>Sat, 07 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>file-uploads</category><category>validation</category></item><item><title>SQL Injection in Laravel: Raw Queries, Bindings and Safe ORDER BY</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-07-sql-injection-laravel-raw-queries-bindings-order-by/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-07-sql-injection-laravel-raw-queries-bindings-order-by/</guid><description>Bind every value (?, named bindings, or the query builder), never interpolate request data into raw SQL, and allow-list column names and sort directions because PDO cannot bind them.</description><pubDate>Fri, 06 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>sql-injection</category><category>database</category></item><item><title>XSS Prevention in Laravel Blade: {{ }}, {!! !!} and Js::from</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-06-xss-prevention-laravel-blade-echo-js-from/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-06-xss-prevention-laravel-blade-echo-js-from/</guid><description>Prefer Blade {{ }} for any user-supplied text, never dump raw input with {!! !!}, use Js::from for JSON in scripts, and leave @{{ }} for frontend frameworks.</description><pubDate>Thu, 05 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>xss</category><category>blade</category></item><item><title>Laravel CSRF Protection: Tokens, Exceptions and SPA Pitfalls</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-05-laravel-csrf-protection-tokens-exceptions-spa/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-05-laravel-csrf-protection-tokens-exceptions-spa/</guid><description>Keep Laravel CSRF on for cookie-auth routes, put tokens in forms and AJAX headers, exclude only true third-party webhooks, and initialize Sanctum SPAs with /sanctum/csrf-cookie.</description><pubDate>Wed, 04 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>csrf</category><category>middleware</category></item><item><title>Laravel Mass Assignment: Fillable, Guarded and Safe Request Validation</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-04-laravel-mass-assignment-fillable-guarded-validated/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-04-laravel-mass-assignment-fillable-guarded-validated/</guid><description>Allow-list model columns, pass only validated input to create() and update(), and make Laravel fail loudly in development when a field is silently dropped.</description><pubDate>Tue, 03 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>eloquent</category><category>validation</category></item><item><title>How We Patched Our Own Site: Clearing 5 npm Advisories with an Astro 7 Upgrade</title><link>https://php-hub-rj.vercel.app/articles/2026-11-03-how-we-patched-our-own-site-astro-7/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/articles/2026-11-03-how-we-patched-our-own-site-astro-7/</guid><description>npm audit flagged 5 advisories (1 critical) on PHP Hub. How we upgraded Astro 5.18.2 to 7.4.5, moved to Node 22 and proved nothing broke.</description><pubDate>Mon, 02 Nov 2026 18:30:00 GMT</pubDate><category>security</category><category>npm</category><category>astro</category><category>dependencies</category><category>case-study</category></item><item><title>Password Hashing in PHP: password_hash, password_verify and Safe Rehashing</title><link>https://php-hub-rj.vercel.app/lessons/2026-11-03-password-hashing-in-php-password-hash-verify-rehash/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-11-03-password-hashing-in-php-password-hash-verify-rehash/</guid><description>Store PHP passwords safely with password_hash() and password_verify(), upgrade old hashes on login with password_needs_rehash(), and migrate legacy MD5 hashes.</description><pubDate>Mon, 02 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>laravel</category><category>security</category><category>passwords</category><category>authentication</category></item><item><title>PHP security this week (26 Oct – 2 Nov 2026)</title><link>https://php-hub-rj.vercel.app/briefs/2026-11-02-php-security-this-week/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/briefs/2026-11-02-php-security-this-week/</guid><description>Five items worth a look this week, from official sources only (checked 2 Nov 2026 against NVD, the CISA KEV catalog and GitHub advisories). One is urgent (PHP itself); the rest are routine…</description><pubDate>Sun, 01 Nov 2026 18:30:00 GMT</pubDate><category>php</category><category>php-core</category><category>symfony</category><category>phpspreadsheet</category><category>phpunit</category><category>weekly</category></item><item><title>Binary Search in PHP: 3 Templates You’ll Actually Use</title><link>https://php-hub-rj.vercel.app/articles/2026-10-27-binary-search-in-php-3-templates/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/articles/2026-10-27-binary-search-in-php-3-templates/</guid><description>Learn binary search in PHP with 3 ready templates: classic search, first/last position, and binary search on the answer, plus common PHP pitfalls.</description><pubDate>Mon, 26 Oct 2026 18:30:00 GMT</pubDate><category>php</category><category>dsa</category><category>binary-search</category><category>algorithms</category></item><item><title>Stacks in PHP: Brackets, RPN, and the Monotonic Stack</title><link>https://php-hub-rj.vercel.app/lessons/2026-10-26-stack-and-monotonic-stack-in-php/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-10-26-stack-and-monotonic-stack-in-php/</guid><description>A stack is last in, first out (LIFO). In PHP you don&apos;t need a class for one, because a plain array already works as a stack. This lesson covers the basic stack template and the monotonic stack,…</description><pubDate>Sun, 25 Oct 2026 18:30:00 GMT</pubDate><category>php</category><category>dsa</category><category>stack</category><category>algorithms</category></item><item><title>PHP2Shell: two critical PHP core RCE flaws fixed in 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35</title><link>https://php-hub-rj.vercel.app/briefs/2026-10-24-php2shell-php-rce/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/briefs/2026-10-24-php2shell-php-rce/</guid><description>On 21 Oct 2026 the PHP project shipped emergency security releases fixing two vulnerabilities in PHP itself (not in any framework or plugin). Both can allow unauthenticated remote code execution.…</description><pubDate>Fri, 23 Oct 2026 18:30:00 GMT</pubDate><category>php</category><category>php-core</category><category>rce</category></item><item><title>Bricksforge (WordPress) unauthenticated file upload → RCE, actively exploited: CVE-2026-85097</title><link>https://php-hub-rj.vercel.app/briefs/2026-10-24-bricksforge-file-upload-rce/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/briefs/2026-10-24-bricksforge-file-upload-rce/</guid><description>Patchstack reports active exploitation of CVE-2026-85097 in Bricksforge, a commercial add-on for the Bricks builder on WordPress. The flaw is an unauthenticated arbitrary file upload that leads to…</description><pubDate>Fri, 23 Oct 2026 18:30:00 GMT</pubDate><category>wordpress</category><category>plugins</category><category>file-upload</category><category>rce</category></item><item><title>Is Railway Safe Now? What the October 2026 Breach Means, Plus a Hosting Security Checklist</title><link>https://php-hub-rj.vercel.app/articles/2026-10-24-is-railway-safe-now-hosting-security-checklist/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/articles/2026-10-24-is-railway-safe-now-hosting-security-checklist/</guid><description>Is Railway safe after the October 2026 breach? What Railway confirmed, what’s still unknown, and a 12-step security checklist for any host.</description><pubDate>Fri, 23 Oct 2026 18:30:00 GMT</pubDate><category>railway</category><category>security</category><category>hosting</category><category>devops</category><category>data-breach</category></item><item><title>Binary Search in PHP Lesson: Classic, Boundary and Answer-Space Patterns</title><link>https://php-hub-rj.vercel.app/lessons/2026-10-24-binary-search-in-php/</link><guid isPermaLink="true">https://php-hub-rj.vercel.app/lessons/2026-10-24-binary-search-in-php/</guid><description>Binary search cuts the search space in half on every step, so it finds an answer in O(log n) time. It isn&apos;t only for finding a value in a sorted array. Here are the three forms that show up in…</description><pubDate>Fri, 23 Oct 2026 18:30:00 GMT</pubDate><category>php</category><category>dsa</category><category>binary-search</category><category>algorithms</category></item></channel></rss>