-
Notifications
You must be signed in to change notification settings - Fork 293
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
Email HTML Injection detection in IAST #8205
Open
sezen-datadog
wants to merge
60
commits into
master
Choose a base branch
from
sezen.leblay/APPSEC-56330-email-injection
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sezen-datadog
added
type: enhancement
comp: asm iast
Application Security Management (IAST)
inst: java
Core Java language instrumentation
labels
Jan 15, 2025
jandro996
reviewed
Jan 15, 2025
internal-api/src/main/java/datadog/trace/api/iast/VulnerabilityMarks.java
Outdated
Show resolved
Hide resolved
jandro996
reviewed
Jan 15, 2025
internal-api/src/main/java/datadog/trace/api/iast/sink/EmailInjectionModule.java
Outdated
Show resolved
Hide resolved
jandro996
reviewed
Jan 15, 2025
dd-java-agent/agent-iast/src/main/java/com/datadog/iast/sink/EmailInjectionModuleImpl.java
Outdated
Show resolved
Hide resolved
jandro996
reviewed
Jan 15, 2025
...ax-mail/src/main/java/datadog/trace/instrumentation/javax/mail/JavaxMailInstrumentation.java
Show resolved
Hide resolved
Nice work @sezen-datadog! you are in the right direction, we can discuss offline the caveats if you want 😃 My comments related to the new iast module can be extended if we need an Object instead of an String Just in case no one had shared with you before, this is an interesting document when we need to implement new iast vulnerabilities |
jandro996
reviewed
Jan 16, 2025
...ax-mail/src/main/java/datadog/trace/instrumentation/javax/mail/JavaxMailInstrumentation.java
Outdated
Show resolved
Hide resolved
jandro996
reviewed
Jan 16, 2025
...ax-mail/src/main/java/datadog/trace/instrumentation/javax/mail/JavaxMailInstrumentation.java
Show resolved
Hide resolved
jandro996
reviewed
Jan 16, 2025
...ax-mail/src/main/java/datadog/trace/instrumentation/javax/mail/JavaxMailInstrumentation.java
Outdated
Show resolved
Hide resolved
…/trace/instrumentation/javax/mail/JavaxMailInstrumentation.java Co-authored-by: Alejandro González García <[email protected]>
…/trace/instrumentation/javax/mail/JavaxMailInstrumentation.java Co-authored-by: Alejandro González García <[email protected]>
setContext and setText of Part StringEscapeUtilsCallsite |
smola
previously requested changes
Jan 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Does This Do
Controls the mails to detect tainted content for javax mail methods, in particular, Transport.send
Motivation
Email HTML injection is a vulnerability where user input is included in the content of an email without proper validation and sanitization. This vulnerability can have severe consequences as it opens the door for various attacks, including phishing, social engineering exploits, and the exploitation of email client vulnerabilities.
This modification provides a control of the body of the email that is meant to be sent. If an injection occurred in the mail body and no sanitization has taken place, the sink will raise an alert.
Jira ticket: APPSEC-56330