CVE-2023-46138 (published 2023-10-31T00:15Z)

JumpServer is an open source bastion host and maintenance security audit system that complies with 4A specifications. Prior to version 3.8.0, the default email for initial user admin is `admin[@]mycompany[.]com`, and users reset their passwords by sending an email. Currently, the domain `mycompany.com` has not been registered. However, if it is registered in the future, it may affect the password reset functionality. This issue has been patched in version 3.8.0 by changing the default email domain to `example.com`. Those who cannot upgrade may change the default email domain to `example.com` manually.

CVSS v3 base score: 5.3, MEDIUM (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N)

Weakness information:
cwe_id: CWE-640
cwe_name: Weak Password Recovery Mechanism for Forgotten Password
description: The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.
extended_description: 
            It is common for an application to have a mechanism that provides a means for a user to gain access to their account in the event they forget their password. Very often the password recovery mechanism is weak, which has the effect of making it more likely that it would be possible for a person other than the legitimate system user to gain access to that user's account. Weak password recovery schemes completely undermine a strong password authentication scheme.
            This weakness may be that the security question is too easy to guess or find an answer to (e.g. because the question is too common, or the answers can be found using social media). Or there might be an implementation weakness in the password recovery mechanism code that may for instance trick the system into e-mailing the new password to an e-mail account other than that of the user. There might be no throttling done on the rate of password resets so that a legitimate user can be denied service by an attacker if an attacker tries to recover their password in a rapid succession. The system may send the original password to the user rather than generating a new temporary password. In summary, password recovery functionality, if not carefully designed and implemented can often become the system's weakest link that can be misused in a way that would allow an attacker to gain unauthorized access to the system.
         
         

Fix information:
repo_url: https://github.com/jumpserver/jumpserver
commit_details: repo_url: https://github.com/jumpserver/jumpserver
author: ibuler
author_date: 2023-09-27 15:12:24+08:00
msg: perf: 修改默认的邮箱地址
repository: repo_url: https://github.com/jumpserver/jumpserver
repo_name: jumpserver/jumpserver
description: An open-source PAM tool alternative to CyberArk.  广受欢迎的开源堡垒机。
repo_language: Python
owner: jumpserver
file_changes: filename: tasks.py
change_type: ModificationType.MODIFY
diff: @@ -37,9 +37,7 @@ def send_mail_async(*args, **kwargs):
         from_email = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
         args.insert(2, from_email)
 
-    args[3] = [mail for mail in args[3] if mail != 'admin@mycomany.com']
     args = tuple(args)
-
     try:
         return send_mail(*args, **kwargs)
     except Exception as e:
@@ -52,7 +50,6 @@ def send_mail_attachment_async(subject, message, recipient_list, attachment_list
         attachment_list = []
     from_email = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
     subject = (settings.EMAIL_SUBJECT_PREFIX or '') + subject
-    recipient_list = [mail for mail in recipient_list if mail != 'admin@mycomany.com']
     email = EmailMultiAlternatives(
         subject=subject,
         body=message,

programming_language: Python
filename: 0046_auto_20230927_1456.py
change_type: ModificationType.ADD
diff: @@ -0,0 +1,21 @@
+# Generated by Django 4.1.10 on 2023-09-27 06:56
+
+from django.db import migrations
+
+
+def migrate_user_default_email(apps, *args):
+    user_cls = apps.get_model('users', 'User')
+    user_cls.objects\
+        .filter(email='admin@mycomany.com')\
+        .update(email='admin@example.com')
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('users', '0045_delete_usersession'),
+    ]
+
+    operations = [
+        migrations.RunPython(migrate_user_default_email),
+    ]

programming_language: Python