Bump com.sun.mail:jakarta.mail from 1.6.7 to 1.6.8 and migrate from com.sun.mail to org.eclipse.angus#394
Conversation
|
It'd be amazing if anyone had information to help me figure out how to backport this to the 1.6.x series - and maybe get it released as a patch? |
|
Hello @henricook For 1.x, keep in mind that we can't break binary compatibility. |
Thanks Gary, would I raise a PR to the 1.x branch to propose a patch to it if binary compatibility was ok? |
|
I'm reasonably confident that 1.6.7 -> 1.6.8 doesn't include any binary compatibility breaking changes. The internals of SMTPTransport.java were changed, and the only other non test changes were:
|
I'd like to see a PR before I make any promises 😉 |
|
Hello @henricook |
commons-email2-jakarta/pom.xml
Outdated
| <dependency> | ||
| <groupId>org.eclipse.angus</groupId> | ||
| <artifactId>jakarta.mail</artifactId> | ||
| <version>2.0.4</version> |
There was a problem hiding this comment.
Why not use the current version 2.0.5? See https://central.sonatype.com/artifact/org.eclipse.angus/jakarta.mail/versions
There was a problem hiding this comment.
Because I must be blind 😢 - on the way
|
The tests that fail in Java 25 and 26 have code like the following: // test bad file
attachment.setPath("");Maybe an empty Path is now allowed? |
4d2fe24 to
5922190
Compare
I think that gives: |
|
Hm, the code in master should probably be redone using NIO instead of IO... |
|
@henricook |
Migrate commons-email2-jakarta from com.sun.mail:jakarta.mail:2.0.2 to org.eclipse.angus:jakarta.mail:2.0.5 - the patched successor of the EOL com.sun.mail implementation. Bump commons-email2-javax from com.sun.mail:jakarta.mail:1.6.7 to 1.6.8. Both prior versions are vulnerable to CVE-2025-7962, an SMTP injection flaw allowing attackers to inject arbitrary SMTP commands via \r\n characters in UTF-8 encoded input.
5922190 to
9370ea7
Compare
|
Done, thanks @garydgregory |
|
PR merged, thank you 👍 |
Summary
commons-email2-jakartafromcom.sun.mail:jakarta.mail:2.0.2toorg.eclipse.angus:jakarta.mail:2.0.4- the patched successor of the EOLcom.sun.mailimplementationcommons-email2-javaxfromcom.sun.mail:jakarta.mail:1.6.7to1.6.8Both versions prior to this change are vulnerable to CVE-2025-7962, an SMTP injection flaw allowing attackers to inject arbitrary SMTP commands via
\r\ncharacters in UTF-8 encoded input.Context
The
com.sun.mail:jakarta.mailimplementation has been superseded by Eclipse Angus, which is described as the "direct successor of JavaMail/JakartaMail". The CVE fix was only released under the Angus coordinates (org.eclipse.angus:jakarta.mail:2.0.4), while the oldcom.sun.mail2.x line remains unpatched.For the
commons-email2-javaxmodule, a backported fix is available atcom.sun.mail:jakarta.mail:1.6.8.Confusing package naming in the CVE
From https://eclipse-ee4j.github.io/angus-mail/
It might be wise for a future change to move away from the discontinued com.sun.mail:jakarta.mail namespace altogether.
References