Homec4science

Lock MIME type configuration

Authored by epriestley <git@epriestley.com> on Mar 25 2015, 18:16.

Description

Lock MIME type configuration

Summary:
Ref T6755. This mitigates an attack where you:

  • compromise an administrative account;
  • configure "text/plain" as an "image" MIME type; and
  • create a new macro sourced from a sensitive resource which is locally accessible over HTTP GET, using DNS rebinding.

You can then view the content of the resource in Files. By preventing the compromised account from reconfiguring the MIME types, the server will instead destroy the response and prevent the attacker from seeing it.

In general, these options should change very rarely, and they often sit just beyond the edge of security vulnerabilities anyway.

For example, if you ignore the warnings about an alternate file domain and elect to serve content from the primary domain, it's still somewhat difficult for an attacker to exploit the vulnerability. If they can add "text/html" or "image/svg+xml" as image MIME types, it becomes trivial. In this case not having an alternate domain is the main issue, but easy modification of this config increases risk/exposure.

Test Plan: Viewed affected config and saw that it is locked.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6755

Differential Revision: https://secure.phabricator.com/D12154

Details

Committed
epriestley <git@epriestley.com>Mar 25 2015, 18:16
Pushed
aubortJan 31 2017, 17:16
Parents
rPH17e1e7a65a8c: Document the need to purge caches after updating differential.generated-paths
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH6ce4044bfa85: Lock MIME type configuration (authored by epriestley <git@epriestley.com>).Mar 25 2015, 18:16