Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility of changing @phpmailer.0 string in asHtml method when composing image cid. #3031

Open
Matslom opened this issue Mar 8, 2024 · 2 comments

Comments

@Matslom
Copy link

Matslom commented Mar 8, 2024

Hello,

There is a hard coded string in https://github.com/PHPMailer/PHPMailer/blob/master/src/PHPMailer.php#L4418 and https://github.com/PHPMailer/PHPMailer/blob/master/src/PHPMailer.php#L4452 which leaks server/app details. For security reasons, we should be able to change this to a custom one, like other headers.

Currently, only way to do that, is to override the entire msgHTML method. Is there a chance to introduce a more flexible approach in the library?

@Synchro
Copy link
Member

Synchro commented Mar 8, 2024

How do you see this as a risk? What threat model do you foresee as applying to it? Neither of these uses are headers. Also bear in mind that msgHTML is purely a convenience function that you don't need to use at all. How would you change the ID generation, bearing in mind that even a random string would be readily fingerprintable?

@mariuszkrzaczkowski
Copy link

Our system underwent a security audit and it was detected as a vulnerability (excerpt below)

Disclosure of redundant environment information in email headers
RECOMMENDATION
We strongly recommend removing redundant headers that reveal information about the technologies used.

I would suggest adding @phpmailer.0 to the variable, which will make it easy to overwrite it
Overwriting the entire function is problematic because it requires monitoring during updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants