Where
-Infinity
0

Russ Allbery: In order to disable automatic previewing of org-mode attachments, you need to customize mm-automatic-display to remove text/x-org from the list of MIME types that are automatically previewed. (This part I have not tested.) As far as I understand it, this only controls inline vs attachment rendering. Content-Disposition: inline MIME parts are still displayed automatically, even if corresponding entries have been removed from mm-automatic-display.

I looked at this and as far as I can tell, to disable rendering, you have to remove entries from mm-inline-media-tests. I don't think this is possible through customization because the variable has bytecode objects in it.

I think it should be possible to filter it down, with something like the code below. Some comments on the choices: Patch rendering is just too useful to skip. HTML rendering is necessary (and obviously quite risky) because Jira and other tools do not generate useful plaintext mail.

It seems necessery to add explicit ignore entries for text/enriched and text/richtext because mm-inline-text handles those internally. The regexp may be required because it's possible that text/enriched/… could be used to bypass the subtype extraction in mm-handle-media-subtype. I haven't tested any of this.

(require 'mm-decode) (let ((result nil) (tail mm-inline-media-tests)) (while tail (let ((type-selector (caar tail)) (handler (cadar tail))) (when (or (eq handler 'ignore) (and (eq handler 'mm-inline-text) (not (member type-selector '("text/enriched" "text/richtext")))) (member type-selector '("image/p?jpeg" "image/png" "image/gif" "text/plain" "text/x-diff" "application/x-patch" "text/html"))) (push (car tail) result))) (setq tail (cdr tail))) (setq result (nreverse result)) (push '("text/enriched." ignore ignore) result) (push '("text/richtext." ignore ignore) result) (setq mm-inline-media-tests result))

I've put these into ~/.gnus.el for now, but having them in ~/.emacs might be a better option for other uses of Emacs MIME rendering.

Thanks, Florian

Severity
5.5
EPSS
0.04%
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

GNU Emacs could provide weaker than expected security, caused by an issue with treating inline MIME contents as trusted. A remote attacker could exploit this vulnerability to launch further attacks on the system.

1 / 4
Source: IBM
First published (updated )
Severity
7.1
EPSS
0.04%
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H

GNU Emacs could provide weaker than expected security, caused by an issue with contents of remote files to be trusted in Org mode. A remote attacker could exploit this vulnerability to launch further attacks on the system.

1 / 4
Source: IBM
First published (updated )
Severity
7.8
EPSS
0.04%
Code Injection
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In Emacs before 29.3, arbitrary Lisp code is evaluated as part of turning on Org mode. This affects Org Mode before 9.6.23.

1 / 2
Source: MITRE
First published (updated )
Severity
7.8
OS Command Injection
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Last updated 27 March 2025

1 / 3
Source: Ubuntu
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203