Possible SMTP Credentials Leak

Hello everyone,

Recently, I had two serious incidents where our SMTP credentials were used to send unauthorized emails. Even after rotating the credentials and reinforcing security measures, the issue happened again.

Current setup:

  • Stack: PHP 8.3, Laravel Framework 11.44, Livewire 3.6.4, FilamentPHP 3.3.36
  • Server: AWS Elastic Beanstalk (Linux + Nginx), application pointing to /public
  • **Security measures:**
    • No
      .env
      file present on the server or in the repository
    • Credentials configured directly in the EB environment
    • Private GitHub repository, no credentials stored
    • No dumps (dump(), var_dump(), etc.) or debug bar in production
    • Access logs reviewed, no explicit credential exposure found
What I’ve done so far:

  • Carefully reviewed Nginx access logs — found attempts to access
    .env
    and other common attack vectors (WordPress, Drupal, CodeIgniter, etc.), all returning 404.
  • Removed any dependencies or configurations that could expose sensitive variables.
The problem:
Even with these precautions, someone recently managed to use new credentials. This suggests there is still some leak point or vulnerability that we haven’t identified yet.

My questions:

  • Are there any known attack vectors in Laravel + Filament + Livewire that could expose environment variables, even without a
    .env
    file and with a properly configured server?
  • Could any third-party extension/package (Laravel, Filament, or Livewire) inadvertently expose sensitive variables under certain conditions?
  • Any extra precautions you recommend for this stack beyond the measures already taken?
Any ideas or insights would be greatly appreciated. 🙏
Was this page helpful?