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

chore(deps): bump github.com/emersion/go-smtp from 0.20.2 to 0.21.0 #1888

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 1, 2024

Bumps github.com/emersion/go-smtp from 0.20.2 to 0.21.0.

Commits
  • 1f30586 Drop Server.AuthDisabled
  • 968926f Drop Session.AuthPlain
  • 8063c1a Disable AUTH when AuthSession.AuthMechanisms is empty
  • c5e530a server: replace EnableAuth with AuthSession
  • a3cdc26 Server: The value of BODY parameter is case-insensitive
  • b7d153a server: use Conn.authAllowed in handleAuth
  • f4b1d1b Add BackendFunc
  • f7e2f0b server: drop Server.caps
  • 33fe6a6 server: send error response on invalid AUTH initial response
  • 65c0260 client: add Client.SupportsAuth
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Apr 1, 2024
@MaineK00n MaineK00n force-pushed the dependabot/go_modules/master/github.com/emersion/go-smtp-0.21.0 branch 2 times, most recently from 87ef545 to 35d80bd Compare April 2, 2024 04:36
Bumps [github.com/emersion/go-smtp](https://github.com/emersion/go-smtp) from 0.20.2 to 0.21.0.
- [Release notes](https://github.com/emersion/go-smtp/releases)
- [Commits](emersion/go-smtp@v0.20.2...v0.21.0)

---
updated-dependencies:
- dependency-name: github.com/emersion/go-smtp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@MaineK00n MaineK00n force-pushed the dependabot/go_modules/master/github.com/emersion/go-smtp-0.21.0 branch 3 times, most recently from f9f44b0 to 2c083bf Compare April 5, 2024 06:54
@MaineK00n MaineK00n force-pushed the dependabot/go_modules/master/github.com/emersion/go-smtp-0.21.0 branch from 2c083bf to 1b0acd1 Compare April 5, 2024 07:14
@MaineK00n
Copy link
Collaborator

MaineK00n commented Apr 5, 2024

Introduced TLS Mode.
You can use "", None, STARTTLS, SMTPS for TLS Mode.
"" behaves the same as before.

verification

TLS Mode: "", Server TLS Mode: ""

$ wget https://raw.githubusercontent.com/rnwood/smtp4dev/master/docker-compose.yml

$ docker compose up -d

$ cat config.toml
[cveDict]
type = "sqlite3"
sqlite3Path = "/data/vulsctl/docker/cve.sqlite3"

[ovalDict]
type = "sqlite3"

[gost]
type = "sqlite3"

[exploit]
type = "sqlite3"

[metasploit]
type = "sqlite3"

[kevuln]
type = "sqlite3"

[cti]
type = "sqlite3"

[email]
smtpAddr      = "127.0.0.1"
smtpPort      = "25"
tlsInsecureSkipVerify = false
user          = "vulsio"
password      = "password"
from          = "from@address.com"
to            = ["to@address.com"]
cc            = ["cc@address.com"]
subjectPrefix = "[vuls]"

[servers]

[servers.pseudo]
type = "pseudo"
cpeNames = [
    "cpe:/o:fortinet:fortios:5.6.2",
]

$ vuls report -to-email
[Apr  5 14:55:23]  INFO [localhost] vuls-v0.25.2-build-20240405_145149_6e2fced
...
| CVE-2021-43206 |  4.3 |  AV:N  |     |           |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+

log

220 smtp4dev smtp4dev ready
EHLO localhost
250-Nice to meet you.
250-8BITMIME
250-SIZE
250-SMTPUTF8
250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
250 AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS
AUTH PLAIN AHZ1bHNpbwBwYXNzd29yZA==
235 Authenticated OK
MAIL FROM:<from@address.com> BODY=8BITMIME
250 New message started
RCPT TO:<to@address.com>
250 Recipient accepted
DATA
354 End message with period
From: from@address.com
To: to@address.com
Cc: cc@address.com
Subject: [vuls]pseudo (pseudo) Total: 48 (Critical:3 High:16 Medium:29 Low:0 ?:0)
Date: Fri, 05 Apr 2024 16:34:15 +0900
Content-Type: text/plain; charset=utf-8

pseudo (pseudo)
===============
Total: 48 (Critical:3 High:16 Medium:29 Low:0 ?:0)
0/0 Fixed, 4 poc, 0 exploits, cisa: 5, uscert: 0, jpcert: 0 alerts
0 installed

+----------------+------+--------+-----+-----------+---------+-------------------------------+
|     CVE-ID     | CVSS | ATTACK | POC |   ALERT   |  FIXED  |           PACKAGES            |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
| CVE-2020-12812 |  9.8 |  AV:N  |     |      CISA |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
...
+----------------+------+--------+-----+-----------+---------+-------------------------------+
| CVE-2021-43206 |  4.3 |  AV:N  |     |           |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
.
250 Mail accepted
QUIT
221 Goodbye

TLS Mode: "", Server TLS Mode: STARTTLS

Note that since the connection is established twice, there will be two sessions.
https://github.com/future-architect/vuls/pull/1888/files#diff-09301177f6ff47efd45b1761269691dbb72619922fa71944919318a24395ee32R111-R123

To avoid this, explicitly set TLS Mode to STARTTLS.

library change commit: emersion/go-smtp@416722c

$ wget https://raw.githubusercontent.com/rnwood/smtp4dev/master/docker-compose.yml

# set STARTTLS Mode in docker-compose.yml
11c11
<       - '25:25'
---
>       - '587:587'
41c41
<       #- ServerOptions__TlsMode=None
---
>       - ServerOptions__TlsMode=STARTTLS
66a67
>       - ServerOptions__Port=587

$ docker compose up -d

$ cat config.toml
[cveDict]
type = "sqlite3"
sqlite3Path = "/data/vulsctl/docker/cve.sqlite3"

[ovalDict]
type = "sqlite3"

[gost]
type = "sqlite3"

[exploit]
type = "sqlite3"

[metasploit]
type = "sqlite3"

[kevuln]
type = "sqlite3"

[cti]
type = "sqlite3"

[email]
smtpAddr      = "127.0.0.1"
smtpPort      = "587"
tlsInsecureSkipVerify = true
user          = "vulsio"
password      = "password"
from          = "from@address.com"
to            = ["to@address.com"]
cc            = ["cc@address.com"]
subjectPrefix = "[vuls]"

[servers]

[servers.pseudo]
type = "pseudo"
cpeNames = [
    "cpe:/o:fortinet:fortios:5.6.2",
]

$ vuls report -to-email
[Apr  5 14:55:23]  INFO [localhost] vuls-v0.25.2-build-20240405_145149_6e2fced
...
| CVE-2021-43206 |  4.3 |  AV:N  |     |           |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
  • log 1
220 smtp4dev smtp4dev ready
EHLO localhost
250-Nice to meet you.
250-8BITMIME
250-SIZE
250-SMTPUTF8
250-STARTTLS
250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
250 AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS

  • log 2
220 smtp4dev smtp4dev ready
EHLO localhost
250-Nice to meet you.
250-8BITMIME
250-SIZE
250-SMTPUTF8
250-STARTTLS
250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
250 AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS
STARTTLS
220 Ready to start TLS
EHLO localhost
250-Nice to meet you.
250-8BITMIME
250-SIZE
250-SMTPUTF8
250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
250 AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS
AUTH PLAIN AHZ1bHNpbwBwYXNzd29yZA==
235 Authenticated OK
MAIL FROM:<from@address.com> BODY=8BITMIME
250 New message started
RCPT TO:<to@address.com>
250 Recipient accepted
DATA
354 End message with period
From: from@address.com
To: to@address.com
Cc: cc@address.com
Subject: [vuls]pseudo (pseudo) Total: 48 (Critical:3 High:16 Medium:29 Low:0 ?:0)
Date: Fri, 05 Apr 2024 16:48:48 +0900
Content-Type: text/plain; charset=utf-8

pseudo (pseudo)
===============
Total: 48 (Critical:3 High:16 Medium:29 Low:0 ?:0)
0/0 Fixed, 4 poc, 0 exploits, cisa: 5, uscert: 0, jpcert: 0 alerts
0 installed

+----------------+------+--------+-----+-----------+---------+-------------------------------+
|     CVE-ID     | CVSS | ATTACK | POC |   ALERT   |  FIXED  |           PACKAGES            |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
| CVE-2020-12812 |  9.8 |  AV:N  |     |      CISA |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
...
+----------------+------+--------+-----+-----------+---------+-------------------------------+
| CVE-2021-43206 |  4.3 |  AV:N  |     |           |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
.
250 Mail accepted
QUIT
221 Goodbye

TLS Mode: STARTTLS, Server TLS Mode: STARTTLS

$ wget https://raw.githubusercontent.com/rnwood/smtp4dev/master/docker-compose.yml

# set STARTTLS Mode in docker-compose.yml
11c11
<       - '25:25'
---
>       - '587:587'
41c41
<       #- ServerOptions__TlsMode=None
---
>       - ServerOptions__TlsMode=STARTTLS
66a67
>       - ServerOptions__Port=587

$ docker compose up -d

$ cat config.toml
[cveDict]
type = "sqlite3"
sqlite3Path = "/data/vulsctl/docker/cve.sqlite3"

[ovalDict]
type = "sqlite3"

[gost]
type = "sqlite3"

[exploit]
type = "sqlite3"

[metasploit]
type = "sqlite3"

[kevuln]
type = "sqlite3"

[cti]
type = "sqlite3"

[email]
smtpAddr      = "127.0.0.1"
smtpPort      = "587"
tlsMode       = "STARTTLS"
tlsInsecureSkipVerify = true
user          = "vulsio"
password      = "password"
from          = "from@address.com"
to            = ["to@address.com"]
cc            = ["cc@address.com"]
subjectPrefix = "[vuls]"

[servers]

[servers.pseudo]
type = "pseudo"
cpeNames = [
    "cpe:/o:fortinet:fortios:5.6.2",
]

$ vuls report -to-email
[Apr  5 14:55:23]  INFO [localhost] vuls-v0.25.2-build-20240405_145149_6e2fced
...
| CVE-2021-43206 |  4.3 |  AV:N  |     |           |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
  • log
220 smtp4dev smtp4dev ready
EHLO localhost
250-Nice to meet you.
250-8BITMIME
250-SIZE
250-SMTPUTF8
250-STARTTLS
250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
250 AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS
STARTTLS
220 Ready to start TLS
EHLO localhost
250-Nice to meet you.
250-8BITMIME
250-SIZE
250-SMTPUTF8
250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
250 AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS
AUTH PLAIN AHZ1bHNpbwBwYXNzd29yZA==
235 Authenticated OK
MAIL FROM:<from@address.com> BODY=8BITMIME
250 New message started
RCPT TO:<to@address.com>
250 Recipient accepted
DATA
354 End message with period
To: to@address.com
Cc: cc@address.com
Subject: [vuls]pseudo (pseudo) Total: 48 (Critical:3 High:16 Medium:29 Low:0 ?:0)
Date: Fri, 05 Apr 2024 16:50:58 +0900
Content-Type: text/plain; charset=utf-8
From: from@address.com

pseudo (pseudo)
===============
Total: 48 (Critical:3 High:16 Medium:29 Low:0 ?:0)
0/0 Fixed, 4 poc, 0 exploits, cisa: 5, uscert: 0, jpcert: 0 alerts
0 installed

+----------------+------+--------+-----+-----------+---------+-------------------------------+
|     CVE-ID     | CVSS | ATTACK | POC |   ALERT   |  FIXED  |           PACKAGES            |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
| CVE-2020-12812 |  9.8 |  AV:N  |     |      CISA |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
...
+----------------+------+--------+-----+-----------+---------+-------------------------------+
| CVE-2021-43206 |  4.3 |  AV:N  |     |           |         | cpe:/o:fortinet:fortios:5.6.2 |
+----------------+------+--------+-----+-----------+---------+-------------------------------+
.
250 Mail accepted
QUIT
221 Goodbye

@MaineK00n MaineK00n requested a review from shino April 5, 2024 07:57
Copy link
Collaborator

@shino shino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! 👯

@MaineK00n MaineK00n merged commit 3cdd2e1 into master Apr 5, 2024
7 checks passed
@MaineK00n MaineK00n deleted the dependabot/go_modules/master/github.com/emersion/go-smtp-0.21.0 branch April 5, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants