Website Hardening for PHP, React and Next.js
Professional audit of IT infrastructure, web applications and cloud environments for discovering, prioritizing and remediating weaknesses before they are exploited. Security is a critical factor for online success, trust and compliance with regulatory requirements.
OWASP Best Practices
CIS Benchmarks
DevSecOps Ready
What we solve
Professional audit of IT infrastructure, web applications and cloud environments for discovering, prioritizing and remediating weaknesses before they are exploited. Security is a critical factor for online success, trust and compliance with regulatory requirements.
- XSS, SQL/NoSQL Injection, CSRF, SSRF, RCE
- Weak configurations of Nginx/Apache/PHP-FPM
- Secrets (.env, tokens, keys)
- Insufficient HTTP headers and TLS policies
- Weak roles and access, lack of audit/logs
For whom is the service
PHP applications
Projects on clean PHP or frameworks like Laravel, Symfony and popular CMS (including WordPress).
React SPA/MPA
Client applications with API integrations, token protection and correct CORS policy.
Next.js (SSR/SSG)
Secure API Routes, middleware for rate limiting, strict CSP and cookie/session protection.
What the service includes
- 1
Audit and tests
- • Review of OWASP ASVS/Top 10 and SANS CWE
- • Static analysis (PHPStan/Psalm; ESLint/TypeScript checks)
- • Dependency audit (Composer/npm, lockfile, supply-chain)
- • Black-box and gray-box testing of critical flows
- 2
Hardening of the server
- • Ubuntu LTS hardened: minimum packages, automatic updates
- • UFW/iptables, Fail2ban, SSH keys, no root access, 2FA for panels
- • Nginx/Apache with ModSecurity CRS, gzip/brotli, A+ TLS (1.2/1.3), HSTS
- • Isolated users and rights (www-data), secure backups
- 3
Hardening of the application
- • Sanitization and validation of the input; parameterized requests
- • Strong HTTP headers: CSP, X-Frame-Options, X-Content-Type-Options
- • Sessions and cookies: HttpOnly, Secure, SameSite, strict lifecycle
- • For Next.js: headers() in next.config.js, middleware rate limiting, strict image domains
- • For PHP: display_errors=Off, expose_php=Off, disabled dangerous functions
- 4
Data, access and monitoring
- • RBAC/least privilege for the database and infrastructure
- • Encryption at rest and in transit (TLS, KMS/external vaults)
- • Centralized logs, alerts and integration with SIEM
- • Incident plan: runbooks, RTO/RPO, evidence/forensic
Methodology
- 1
Start
Short interview, scope, access and risk prioritization.
- 2
Analysis
Combined automated and manual audit of code, configurations and infrastructure.
- 3
Remediation
Prioritized plan, fixes, PRs, strong configurations and secret rotation.
- 4
Check
Retests, regression and validation of the production environment without downtime.
- 5
Continuous protection
Monitoring, alerting and periodic reviews (optional).
What you get
- Detailed audit report with weight (Risk/Impact/Exploitability)
- Plan for fixes and recommendations for implementation
- Hardening checklist (server + application) for future releases
- Configuration templates (Nginx/Apache, PHP-FPM, Next.js headers)
- Management and technical application summary
- Configured monitoring and alerts for critical events
- Training of the team: secrets, deployment, key rotation
- Retest and validated report after remediation
- Optional: Continuous Hardening subscription
Tech specifics by stack
PHP
- Composer audit, version pinning and secure mirrors
- PHPStan/Psalm levels, strict type control
- ini: expose_php=Off, display_errors=Off, restrictions for upload
- Sessions: cookie_httponly=1, samesite=Strict/Lax
React
- Auto-escape, but protection at dangerouslySetInnerHTML
- Isolated tokens, PKCE/OAuth2, secure storage
- Strict CORS, rate limiting on API, schema validation
Next.js
- CSP, HSTS, XFO through headers() in next.config.js
- Middleware protection: bot filtering, rate limiting, IP allow/deny
- Secrets only on server; protected cookies; restricted image domains
Packages and pricing
Basic
- Server and configuration review
- HTTP headers and TLS configuration
- Audit-summary and quick wins (quick wins)
Professional
- Full audit (code + infrastructure)
- Fixes and PRs for critical vulnerabilities
- Retest and validated report
Enterprise
- Many servers, HA/clustering, CDN/WAF
- SIEM integration, runbooks and tabletop exercises
- Continuous hardening and SLA