Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 2026-09-11

* Security
* Ship a restrictive ImageMagick policy denying the MSL/MVG/MSVG script
coders and the EPHEMERAL/URL/HTTP/HTTPS/FTP delegates, and install
`librsvg2-bin` so ImageMagick delegates SVG decoding to `rsvg-convert`
instead of falling back to its own coder when the binary is missing
(OC10-164)

## 2026-07-06

* Added
Expand Down
1 change: 1 addition & 0 deletions v22.04/Dockerfile.multiarch
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ RUN apt-get update -y && \
exiftool \
sqlite3 \
librsvg2-common \
librsvg2-bin \
ghostscript && \
apt-add-repository -r "https://deb.owncloud.com/php.freexian.com/" -y && \
rm -rf /etc/apache2/envvars /etc/apache2/conf-* /etc/apache2/sites-* /var/log/apache2/* && \
Expand Down
45 changes: 45 additions & 0 deletions v22.04/overlay/etc/ImageMagick-6/policy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)*>
<!ATTLIST policymap xmlns CDATA #FIXED ''>
<!ELEMENT policy EMPTY>
<!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
]>
<!--
ownCloud-managed ImageMagick policy (owncloud-docker/php).

Denies the script/vector coders that read and write arbitrary files via
ImageMagick's MSL interpreter (see OC10-164) and the delegates that let a
processed image reach the network or the filesystem outside its own input.
Deliberately does NOT deny the PS/PDF/EPS/XPS coders or add a blanket
delegate/coder deny-all - ownCloud's PDF and Postscript previews decode
through the Ghostscript delegate, and a deny-all would break them.
-->
<policymap>
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="width" value="16KP"/>
<policy domain="resource" name="height" value="16KP"/>
<policy domain="resource" name="area" value="128MP"/>
<policy domain="resource" name="disk" value="1GiB"/>
<policy domain="path" rights="none" pattern="@*"/>
<policy domain="delegate" rights="none" pattern="URL"/>
<policy domain="delegate" rights="none" pattern="HTTPS"/>
<policy domain="delegate" rights="none" pattern="HTTP"/>
<policy domain="delegate" rights="none" pattern="FTP"/>
<policy domain="coder" rights="none" pattern="EPHEMERAL"/>
<policy domain="coder" rights="none" pattern="URL"/>
<policy domain="coder" rights="none" pattern="HTTPS"/>
<policy domain="coder" rights="none" pattern="MVG"/>
<policy domain="coder" rights="none" pattern="MSL"/>
<policy domain="coder" rights="none" pattern="MSVG"/>
<policy domain="coder" rights="none" pattern="TEXT"/>
<policy domain="coder" rights="none" pattern="SHOW"/>
<policy domain="coder" rights="none" pattern="WIN"/>
<policy domain="coder" rights="none" pattern="PLT"/>
<policy domain="coder" rights="none" pattern="LABEL"/>
<policy domain="coder" rights="none" pattern="CAPTION"/>
<policy domain="coder" rights="none" pattern="PANGO"/>
</policymap>
1 change: 1 addition & 0 deletions v24.04/Dockerfile.multiarch
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -y && \
exiftool \
sqlite3 \
librsvg2-common \
librsvg2-bin \
ghostscript && \
rm -rf /etc/apache2/envvars /etc/apache2/conf-* /etc/apache2/sites-* /var/log/apache2/* && \
a2enmod rewrite headers env dir mime expires remoteip && \
Expand Down
45 changes: 45 additions & 0 deletions v24.04/overlay/etc/ImageMagick-6/policy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)*>
<!ATTLIST policymap xmlns CDATA #FIXED ''>
<!ELEMENT policy EMPTY>
<!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
]>
<!--
ownCloud-managed ImageMagick policy (owncloud-docker/php).

Denies the script/vector coders that read and write arbitrary files via
ImageMagick's MSL interpreter (see OC10-164) and the delegates that let a
processed image reach the network or the filesystem outside its own input.
Deliberately does NOT deny the PS/PDF/EPS/XPS coders or add a blanket
delegate/coder deny-all - ownCloud's PDF and Postscript previews decode
through the Ghostscript delegate, and a deny-all would break them.
-->
<policymap>
<policy domain="resource" name="memory" value="1024MiB"/>
<policy domain="resource" name="map" value="2048MiB"/>
<policy domain="resource" name="width" value="32KP"/>
<policy domain="resource" name="height" value="32KP"/>
<policy domain="resource" name="area" value="256MP"/>
<policy domain="resource" name="disk" value="2GiB"/>
<policy domain="path" rights="none" pattern="@*"/>
<policy domain="delegate" rights="none" pattern="URL"/>
<policy domain="delegate" rights="none" pattern="HTTPS"/>
<policy domain="delegate" rights="none" pattern="HTTP"/>
<policy domain="delegate" rights="none" pattern="FTP"/>
<policy domain="coder" rights="none" pattern="EPHEMERAL"/>
<policy domain="coder" rights="none" pattern="URL"/>
<policy domain="coder" rights="none" pattern="HTTPS"/>
<policy domain="coder" rights="none" pattern="MVG"/>
<policy domain="coder" rights="none" pattern="MSL"/>
<policy domain="coder" rights="none" pattern="MSVG"/>
<policy domain="coder" rights="none" pattern="TEXT"/>
<policy domain="coder" rights="none" pattern="SHOW"/>
<policy domain="coder" rights="none" pattern="WIN"/>
<policy domain="coder" rights="none" pattern="PLT"/>
<policy domain="coder" rights="none" pattern="LABEL"/>
<policy domain="coder" rights="none" pattern="CAPTION"/>
<policy domain="coder" rights="none" pattern="PANGO"/>
</policymap>