<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
  <channel>
    <title>Zend Framework Security Advisories</title>
    <description>Reported and patched vulnerabilities in Zend Framework</description>
    <pubDate>Thu, 28 Mar 2019 00:00:00 +0000</pubDate>
    <generator>Zend_Feed_Writer 2 (http://framework.zend.com)</generator>
    <link>https://framework.zend.com/security</link>
    <author>zf-security@zend.com (Zend Framework Security) (Zend Framework Security)</author>
    <dc:creator>Zend Framework Security</dc:creator>
    <atom:link rel="self" type="application/rss+xml" href="https://framework.zend.com/security/feed"/>
    <item>
      <title>ZF2019-01: Information disclosure in zend-developer-tools</title>
      <pubDate>Thu, 28 Mar 2019 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2019-01</link>
      <guid>https://framework.zend.com/security/advisory/ZF2019-01</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2019-01: Information disclosure in zend-developer-tools</h1>
<p>The package
<a href="https://github.com/zendframework/zend-developer-tools">zendframework/zend-developer-tools</a>
provides a web-based toolbar for introspecting an application. When updating the
package to support PHP 7.3, a change was made that could potentially prevent
toolbar entries that are enabled by default from being disabled.</p>
<h2>Affected versions</h2>
<ul>
<li>zendframework/zend-developer-tools 1.2.2</li>
</ul>
<h2>Action Taken</h2>
<p>A test was added to the package to verify that only whitelisted entries should
be aggregated when configuring the toolbar, and the code updated to comply.</p>
<p>The patch resolving the vulnerability is available in zend-developer-tools
1.2.3.</p>
<p>We highly recommend all users of the package to update immediately.</p>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>
<a href="http://www.mrutschmann.com/">Marc Schulthess</a> for advising us of the vulnerability.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2018-01: URL rewrite vulnerability</title>
      <pubDate>Wed, 01 Aug 2018 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2018-01</link>
      <guid>https://framework.zend.com/security/advisory/ZF2018-01</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2018-01: URL Rewrite vulnerability</h1>
<p><a href="https://docs.zendframework.com/zend-diactoros">zend-diactoros</a> (and, by
extension, <a href="https://getexpressive.org">Expressive</a>),
<a href="https://docs.zendframework.com/zend-http">zend-http</a> (and, by extension,
<a href="https://docs.zendframework.com/zend-mvc/quick-start">Zend Framework MVC projects</a>),
and <a href="https://docs.zendframework.com/zend-feed">zend-feed</a> (specifically, its
PubSubHubbub sub-component) each contain a potential URL rewrite exploit. In
each case, marshaling a request URI includes logic that introspects HTTP request
headers that are specific to a given server-side URL rewrite mechanism.</p>
<p>When these headers are present on systems not running the specific URL rewriting
mechanism, the logic would still trigger, allowing a malicious client or proxy
to emulate the headers to request arbitrary content.</p>
<h2>Action Taken</h2>
<p>In each of the affected components, we have removed support for the specific
request headers. Users can provide support within their applications to
re-instate the logic if they are using the specific URL rewrite mechanism; users
are encouraged to filter these headers in their web server prior to any rewrites
to ensure their validity.</p>
<p>The patch resolving the vulnerability is available in:</p>
<ul>
<li>zend-diactoros, 1.8.4</li>
<li>zend-http, 2.8.1</li>
<li>zend-feed, 2.10.3</li>
</ul>
<p>Zend Framework MVC, Apigility, and Expressive users will receive relevant
updated components via <code>composer update</code>.</p>
<p>We highly recommend all users of affected projects update immediately.</p>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>The <a href="https://www.drupal.org/drupal-security-team">Drupal Security Team</a> for
advising us of the vulnerabilities, and coordinating the release.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2016-04: Potential remote code execution in zend-mail via Sendmail adapter</title>
      <pubDate>Tue, 20 Dec 2016 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2016-04</link>
      <guid>https://framework.zend.com/security/advisory/ZF2016-04</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2016-04: Potential remote code execution in zend-mail via Sendmail adapter</h1>
<p>When using the <a href="https://github.com/zendframework/zend-mail">zend-mail</a> component
to send email via the <code>Zend\Mail\Transport\Sendmail</code> transport, a malicious user
may be able to inject arbitrary parameters to the system sendmail program.
The attack is performed by providing additional quote characters within an
address; when unsanitized, they can be interpreted as additional command line
arguments, leading to the vulnerability.</p>
<p>The following example demonstrates injecting additional parameters to the
sendmail binary via the <code>From</code> address:</p>
<pre><code class="language-php">use Zend\Mail;

$mail = new Mail\Message();
$mail-&gt;setBody('This is the text of the email.');

// inject additional parameters to sendmail command line
$mail-&gt;setFrom('&quot;AAA\&quot; params injection&quot;@domain', 'Sender\'s name');

$mail-&gt;addTo('hacker@localhost', 'Name of recipient');
$mail-&gt;setSubject('TestSubject');

$transport = new Mail\Transport\Sendmail();
$transport-&gt;send($mail);
</code></pre>
<p>The attack works because zend-mail filters the email addresses using
the <a href="https://tools.ietf.org/html/rfc3696#section-3">RFC 3696</a> specification,
where the string <code>&quot;AAA\&quot; params injection&quot;@domain</code> is considered a valid
address. This validation is provided using the zend-validator component with
the following parameters:</p>
<pre><code class="language-php">Zend\Validator\EmailAddress(
    Zend\Validator\Hostname::ALLOW_DNS | Zend\Validator\Hostname::ALLOW_LOCAL
)
</code></pre>
<p>The above accepts local domain with any string specified by double quotes as the
local part. While this is valid per RFC 3696, due to the fact that sender email
addresses are provided to the sendmail binary via the command line, they create
the vulnerability described above.</p>
<h2>Action Taken</h2>
<p>To fix the issue, we added a transport-specific email filter for the <code>From</code>
header in the <code>Sendmail</code> transport adapter. The filter checks for the sequence
<code>\&quot;</code> in the local part of the email <code>From</code> address.</p>
<pre><code class="language-php">$from = $headers-&gt;get('From');
if ($from) {
    foreach ($from-&gt;getAddressList() as $address) {
        if (preg_match('/\\\&quot;/', $address-&gt;getEmail())) {
            throw new Exception\RuntimeException(&quot;Potential code injection in From header&quot;);
        }
    }
}
</code></pre>
<p>The patch resolving the vulnerability is available in:</p>
<ul>
<li>zend-mail, starting in version 2.7.2</li>
<li>zend-mail, 2.4.11</li>
<li>Zend Framework, 2.4.11</li>
</ul>
<p>Zend Framework 2.5 and 3.0 versions will receive the update automatically, as
executing <code>composer update</code> in projects using these versions will update to
zend-mail
2.7.2+.</p>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>The independent security researcher <a href="https://legalhackers.com/">Dawid Golunski</a>,
who reported the vulnerability to Beyond Security’s SecuriTeam Secure
Disclosure program;</li>
<li>
<a href="http://www.zimuel.it">Enrico Zimuel</a>, who provided the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2016-03: Potential SQL injection in ORDER and GROUP functions of ZF1</title>
      <pubDate>Thu, 08 Sep 2016 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2016-03</link>
      <guid>https://framework.zend.com/security/advisory/ZF2016-03</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2016-03: Potential SQL injection in ORDER and GROUP functions of ZF1</h1>
<p>The implementation of <code>ORDER BY</code> and <code>GROUP BY</code> in <code>Zend_Db_Select</code> remained
prone to SQL injection when a combination of SQL expressions and comments were
used. This security patch provides a comprehensive solution that identifies and
removes comments prior to checking validity of the statement to ensure no SQLi
vectors occur.</p>
<p>The implementation of <code>ORDER BY</code> and <code>GROUP BY</code> in <code>Zend_Db_Select</code> of ZF1 is
vulnerable by the following SQL injection:</p>
<pre><code class="language-php">$db = Zend_Db::factory(/* options here */);
$select = new Zend_Db_Select($db);
$select-&gt;from('p');
$select-&gt;order(&quot;MD5(\&quot;a(\&quot;);DELETE FROM p2; #)&quot;); // same with group()
</code></pre>
<p>The above <code>$select</code> will render the following SQL statement:</p>
<pre><code class="language-sql">SELECT `p`.* FROM `p` ORDER BY MD5(&quot;a(&quot;);DELETE FROM p2; #) ASC
</code></pre>
<p>instead of the correct one:</p>
<pre><code class="language-sql">SELECT &quot;p&quot;.* FROM &quot;p&quot; ORDER BY &quot;MD5(&quot;&quot;a(&quot;&quot;);DELETE FROM p2; #)&quot; ASC
</code></pre>
<p>This security fix can be considered an improvement of the previous
<a href="/security/advisory/ZF2016-02">ZF2016-02</a> and
<a href="/security/advisory/ZF2014-04">ZF2014-04</a> advisories.</p>
<p>As a final consideration, we recommend developers either never use user input
for these operations, or filter user input thoroughly prior to invoking
<code>Zend_Db</code>.  You can use the <code>Zend_Db_Select::quoteInto()</code> method to filter the
input data, as shown in this example:</p>
<pre><code class="language-php">$db    = Zend_Db::factory(...);
$input = &quot;MD5(\&quot;a(\&quot;);DELETE FROM p2; #)&quot;; // user input can be an attack
$order = $db-&gt;quoteInto(&quot;SQL statement for ORDER&quot;, $input);

$select = new Zend_Db_Select($db);
$select-&gt;from('p');
$select-&gt;order($order); // same with group()
</code></pre>
<h2>Action Taken</h2>
<p>We fixed the reported SQL injection by removing comments from the SQL statement
before passing it to either the <code>order()</code> or <code>group()</code> methods; this patch
effectively solves any comment-based SQLi vectors.</p>
<p>We used the following regex to remove comments from a SQL statement:</p>
<pre><code class="language-php">const REGEX_SQL_COMMENTS = '@
    (([\'&quot;]).*?[^\\\]\2) # $1 : Skip single &amp; double quoted expressions
    |(                   # $3 : Match comments
        (?:\#|--).*?$    # - Single line comments
        |                # - Multi line (nested) comments
         /\*             #   . comment open marker
            (?: [^/*]    #   . non comment-marker characters
                |/(?!\*) #   . ! not a comment open
                |\*(?!/) #   . ! not a comment close
                |(?R)    #   . recursive case
            )*           #   . repeat eventually
        \*\/             #   . comment close marker
    )\s*                 # Trim after comments
    |(?&lt;=;)\s+           # Trim after semi-colon
    @msx';
</code></pre>
<p><strong>The patch is available starting in Zend Framework 1.12.20.</strong></p>
<h2>Other Information</h2>
<p>This SQL injection attack does not affect Zend Framework 2 and 3 versions because the
implementations of <code>Zend\Db\Sql\Select::order()</code> and <code>Zend\Db\Sql\Select::group()</code> do
not manage parenthetical expressions.</p>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>Hiroshi Tokumaru (HASH Consulting Corp.), who discovered the issue;</li>
<li>Masanobu Katagi (Japan Computer Emergency Response Team Coordination Center),
who reported the issue;</li>
<li>
<a href="http://www.zimuel.it">Enrico Zimuel</a>, who provided the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2016-02: Potential SQL injection in ORDER and GROUP statements of Zend_Db_Select</title>
      <pubDate>Wed, 13 Jul 2016 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2016-02</link>
      <guid>https://framework.zend.com/security/advisory/ZF2016-02</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2016-02: Potential SQL injection in ORDER and GROUP statements of Zend_Db_Select</h1>
<p>The implementation of <code>ORDER BY</code> and <code>GROUP BY</code> in <code>Zend_Db_Select</code> of ZF1 is
vulnerable by the following SQL injection:</p>
<pre><code class="language-php">$db = Zend_Db::factory(/* options here */);
$select = new Zend_Db_Select($db);
$select-&gt;from('p');
$select-&gt;order(&quot;MD5(\&quot;(\&quot;);DELETE FROM p2; #)&quot;); // same with group()
</code></pre>
<p>The above <code>$select</code> will render the following SQL statement:</p>
<pre><code class="language-sql">SELECT `p`.* FROM `p` ORDER BY MD5(&quot;&quot;);DELETE FROM p2; #) ASC
</code></pre>
<p>instead of the correct one:</p>
<pre><code class="language-sql">SELECT `p`.* FROM `p` ORDER BY &quot;MD5(&quot;&quot;&quot;&quot;);DELETE FROM p2; #)&quot; ASC
</code></pre>
<p>This security fix can be considered as an improvement of the previous
<a href="/security/advisory/ZF2014-04">ZF2014-04</a>.</p>
<h2>Action Taken</h2>
<p>We fixed the reported SQL injection using two regular expressions for the <code>order()</code> and the <code>group()</code>
methods in <code>Zend_Db_Select</code>, created as the class constants <code>REGEX_COLUMN_EXPR_ORDER</code> and
<code>REGEX_COLUMN_EXPR_GROUP</code>, respectively. These are defined as:</p>
<pre><code class="language-text">/^([\w]+\s*\(([^\(\)]|(?1))*\))$/
</code></pre>
<p>This regexp is different from the previous <code>REGEX_COLUMN_EXPR</code>, which used the
character pattern <code>[\w]*</code>; we now require at least one word boundary (<code>[\w]+</code>).</p>
<p><strong>The patch is available starting in Zend Framework 1.12.19.</strong></p>
<h2>Other Information</h2>
<p>This SQL injection attack does not affect Zend Framework 2 and 3 versions because the
implementations of <code>Zend\Db\Sql\Select::order()</code> and <code>Zend\Db\Sql\Select::group()</code> do
not manage parenthetical expressions.</p>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>Peter O'Callaghan, who discovered and reported the issue;</li>
<li>
<a href="http://www.zimuel.it">Enrico Zimuel</a>, who provided the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2016-01: Potential Insufficient Entropy Vulnerability in Zend Framework 1</title>
      <pubDate>Wed, 13 Apr 2016 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2016-01</link>
      <guid>https://framework.zend.com/security/advisory/ZF2016-01</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2016-01: Potential Insufficient Entropy Vulnerability in ZF1</h1>
<p>We discovered several methods used to generate random numbers in ZF1 that
potentially used insufficient entropy. These random number generators are used
in the following method calls:</p>
<ul>
<li>
<code>Zend_Ldap_Attribute::createPassword</code>
</li>
<li>
<code>Zend_Form_Element_Hash::_generateHash</code>
</li>
<li>
<code>Zend_Gdata_HttpClient::filterHttpRequest</code>
</li>
<li>
<code>Zend_Filter_Encrypt_Mcrypt::_srand</code>
</li>
<li>
<code>Zend_OpenId::randomBytes</code>
</li>
</ul>
<p>In each case, the methods were using <code>rand()</code> or <code>mt_rand()</code>, neither of which
can generate cryptographically secure values. This could potentially lead to
information disclosure should an attacker be able to brute force the random
number generation.</p>
<p>Moreover, we discovered a potential security issue in the usage of the
<a href="http://php.net/manual/en/function.openssl-random-pseudo-bytes.php">openssl_random_pseudo_bytes()</a>
function in <code>Zend_Crypt_Math::randBytes</code>, reported in PHP BUG
<a href="https://bugs.php.net/bug.php?id=70014">#70014</a>, and the security implications
reported in a discussion <a href="https://github.com/paragonie/random_compat/issues/96">on the random_compat library</a>.</p>
<h2>Action Taken</h2>
<p>We replaced the usage of <code>rand()</code> and <code>mt_rand()</code> with the random generators of
ZF1 implemented in <a href="https://github.com/zendframework/zf1/blob/master/library/Zend/Crypt/Math.php">Zend_Crypt_Math()</a>.</p>
<p>Moreover, we removed the usage of <code>openssl_random_pseudo_bytes()</code> functions in
<code>Zend_Crypt_Math::randBytes()</code>. This removal is not a BC break for Linux users
thanks to the usage of <code>/dev/urandom</code> as an entropy source. For Windows users,
this can be a BC break if the Mcrypt extension is not enabled.</p>
<p>The following releases contain the fixes:</p>
<ul>
<li>Zend Framework 1.12.18</li>
</ul>
<h2>Recommendations</h2>
<p>If you are using an affected version of PHP, we highly recommend upgrading
immediately to Zend Framework 1.12.18.</p>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>Brian Engert of <a href="http://www.soliantconsulting.com/">Soliant Consulting</a>, who
discovered, reported, and proposed a patch for the issue;</li>
<li>
<a href="http://zimuel.it">Enrico Zimuel</a>,  who tested the patch and added the patch
for the OpenSSL usage removal.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2015-09: Potential Information Disclosure and Insufficient Entropy vulnerability in Zend\Captcha\Word</title>
      <pubDate>Mon, 23 Nov 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2015-09</link>
      <guid>https://framework.zend.com/security/advisory/ZF2015-09</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2015-09: Potential Information Disclosure and Insufficient Entropy vulnerability in Zend\Captcha\Word</h1>
<p>In Zend Framework, <code>Zend_Captcha_Word</code> (v1) and <code>Zend\Captcha\Word</code> (v2)
generate a &quot;word&quot; for a CAPTCHA challenge by selecting a sequence of random
letters from a character set. Prior to this advisory, the selection was
performed using PHP's internal <code>array_rand()</code> function. This function does not
generate sufficient entropy due to its usage of <code>rand()</code> instead of more
cryptographically secure methods such as <code>openssl_pseudo_random_bytes()</code>. This
could potentially lead to information disclosure should an attacker be able to
brute force the random number generation.</p>
<h2>Action Taken</h2>
<p>The code used to randomly select letters was updated as follows:</p>
<ul>
<li>In Zend Framework 1.12.17, the methods <code>randBytes()</code> and <code>randInteger()</code> were
added to <code>Zend_Crypt_Math</code>. <code>Zend_Captcha_AbstractWord</code> was updated to use
<code>Zend_Crypt_Math::randInteger()</code> instead of <code>array_rand()</code> when selecting
letters for the CAPTCHA word.</li>
<li>In the package zendframework/zend-captcha 2.4.9/2.5.2 and Zend Framework
2.4.9, <code>Zend\Captcha\AbstractWord</code> was updated to use
<code>Zend\Math\Rand::getInteger()</code> instead of <code>array_rand()</code> when selecting
letters for the CAPTCHA word.</li>
</ul>
<p>The following releases contain the fixes:</p>
<ul>
<li>Zend Framework 1.12.17</li>
<li>Zend Framework 2.4.9</li>
<li>zend-captcha 2.4.9</li>
<li>zend-captcha 2.5.2</li>
</ul>
<h2>Recommendations</h2>
<p>This patch is considered a <em>security hardening</em> patch, and as such, was not
assigned a <a href="https://cve.mitre.org">CVE</a> identifier.</p>
<p>Regardless, if you use one of the word-based CAPTCHA adapters in Zend Framework
1 or 2, we recommend upgrading to 1.12.17, 2.4.9, or zend-captcha 2.4.9/2.5.2.</p>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>
<a href="https://github.com/us3r777">Vincent Herbulot</a> for reporting the issue, and</li>
<li>
<a href="http://zimuel.it">Enrico Zimuel</a>, who provided the patches.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2015-10: Potential Information Disclosure in Zend\Crypt\PublicKey\Rsa\PublicKey</title>
      <pubDate>Mon, 23 Nov 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2015-10</link>
      <guid>https://framework.zend.com/security/advisory/ZF2015-10</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2015-10: Potential Information Disclosure in Zend\Crypt\PublicKey\Rsa\PublicKey</h1>
<p><code>Zend\Crypt\PublicKey\Rsa\PublicKey</code> has a call to <code>openssl_public_encrypt()</code>
which uses PHP's default <code>$padding</code> argument, which specifies
<code>OPENSSL_PKCS1_PADDING</code>, indicating usage of PKCS1v1.5 padding. This padding has
a known vulnerability, the <a href="http://crypto.stackexchange.com/questions/12688/can-you-explain-bleichenbachers-cca-attack-on-pkcs1-v1-5">Bleichenbacher's chosen-ciphertext attack</a>,
which can be used to decrypt arbitrary ciphertexts.</p>
<h3>Action Taken</h3>
<ul>
<li>
<code>Zend\Crypt\PublicKey\Rsa\PublicKey::encrypt()</code> was updated to accept an
additional argument, <code>$padding</code>; the default value for this argument was set
to <code>OPENSSL_PKCS1_OAEP_PADDING</code>.</li>
<li>
<code>Zend\Crypt\PublicKey\Rsa\PrivateKey::decrypt()</code> was updated to accept an
additional argument, <code>$padding</code>; the default value for this argument was set
to <code>OPENSSL_PKCS1_OAEP_PADDING</code>.</li>
<li>
<code>Zend\Crypt\PublicKey\Rsa::encrypt()</code> was updated to accept an additional
optional argument, <code>$padding</code>, allowing the user to specify the padding to use
with <code>PublicKey::encrypt()</code>.</li>
<li>
<code>Zend\Crypt\PublicKey\Rsa::decrypt()</code> was updated to accept an additional
optional argument, <code>$padding</code>, allowing the user to specify the padding to use
with <code>PrivateKey::decrypt()</code>.</li>
</ul>
<p>The above changes represent a backwards-compatibility break, but were necessary
to prevent the outlined vulnerability. If you were using
<code>Zend\Crypt\PublicKey\Rsa</code> previously, you will likely need to re-encrypt any
data you've previously encrypted to use the new padding. This can be done as
follows:</p>
<pre><code class="language-php">$decrypted = $rsa-&gt;decrypt($data, $key, $rsa::MODE_AUTO, OPENSSL_PKCS1_PADDING);
$encrypted = $rsa-&gt;encrypt($data, $key); // Encrypted using OPENSSL_PKCS1_OAEP_PADDING
</code></pre>
<p>The key may have a value of <code>null</code> in each of the examples above.</p>
<p>The following releases contain the fixes:</p>
<ul>
<li>Zend Framework 2.4.9</li>
<li>zend-framework/zend-crypt 2.4.9</li>
<li>zend-framework/zend-crypt 2.5.2</li>
</ul>
<p>This advisory was given the <a href="https://cve.mitre.org">CVE</a> identifier <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-7503">CVE-2015-7503</a></p>
<h2>Recommendations</h2>
<p>If you use zend-crypt via either Zend Framework 2 or the
zendframework/zend-crypt package, and are using the RSA public key
functionality, we recommend upgrading to 2.4.9/2.5.2 immediately.</p>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>
<a href="https://paragonie.com">Paragon Initiative Enterprises</a> for reporting the
vulnerability and verifying the patch, and</li>
<li>
<a href="http://zimuel.it">Enrico Zimuel</a>, who provided the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2015-07: Filesystem Permissions Issues in Multiple Components</title>
      <pubDate>Tue, 15 Sep 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2015-07</link>
      <guid>https://framework.zend.com/security/advisory/ZF2015-07</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2015-07: Filesystem Permissions Issues in Multiple Components</h1>
<p><a href="http://www.doctrine-project.org/2015/08/31/security_misconfiguration_vulnerability_in_various_doctrine_projects.html">As reported by the Doctrine Project</a>,
incorrect permissions masks when creating a new directory or file can lead to:</p>
<ul>
<li>Local arbitrary code execution</li>
<li>Privilege escalation</li>
</ul>
<p>Such attacks typically require direct access to a user of the system to exploit,
but are dangerous vectors when available.</p>
<p>During an audit of the Zend Framework code base, we found several instances
where we were using incorrect permissions masks that could lead to such
vulnerabilities.</p>
<h2>Action Taken</h2>
<p>We identified the following projects/components with vulnerabilities by checking
for <code>mkdir()</code> and <code>umask()</code> calls:</p>
<ul>
<li>Zend Framework 2's <code>zend-cache</code> component, specifically the <code>Filesystem</code>
storage adapter and <code>CaptureCache</code> pattern.</li>
<li>The admin-facing code for <a href="https://github.com/zfcampus/zf-apigility-doctrine">zf-apigility-doctrine</a>.</li>
<li>Zend Framework 1's <code>Zend_Cloud</code> Filesystem storage adapter,
<code>Zend_Search_Lucene</code>'s filesystem storage, and <code>Zend_Service_WindowsAzure</code>'s
package scaffolder.</li>
</ul>
<p>We updated the code as follows:</p>
<ul>
<li>Default privileges for creating directories were set to <code>0775</code>, and files to
<code>0664</code>.</li>
<li>If code allows specifying the permissions mask, we mask it using <code>&amp; ~0002</code>.</li>
<li>This means that if you absolutely must allow world-executable privileges, you
<strong>must</strong> extend the class. This leaves the framework secure by default, and is
an effort to prevent developers from shooting themselves in the foot.</li>
</ul>
<p>The following components/libraries were patched, at the version specified:</p>
<ul>
<li>Zend Framework 1, version 1.12.16</li>
<li>Zend Framework 2, versions 2.4.8</li>
<li>zf-apigility-doctrine, version 1.0.3</li>
<li>zend-cache, versions 2.4.8 and 2.5.3</li>
</ul>
<p>This vulnerability was originally disclosed via the Doctrine project as <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-5723">CVE-2015-5723</a>.</p>
<h2>Recommendations</h2>
<p>If you use any of the components listed above, we recommend upgrading to one of
these versions immediately.</p>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>
<a href="https://github.com/Ocramius">Marco Pivetta</a> for notifying us of the Doctrine
project's vulnerability, suggesting we audit similarly, and reviewing the
patch;</li>
<li>
<a href="https://mwop.net/">Matthew Weier O'Phinney</a> for developing the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2015-08: Potential SQL injection vector using null byte for PDO (MsSql, SQLite)</title>
      <pubDate>Tue, 15 Sep 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2015-08</link>
      <guid>https://framework.zend.com/security/advisory/ZF2015-08</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2015-08: Potential SQL injection vector using null byte for PDO (MsSql, SQLite)</h1>
<p>The PDO adapters of Zend Framework 1 do not filter null bytes values in SQL
statements. A PDO adapter can treat null bytes in a query as a string
terminator, allowing an attacker to add arbitrary SQL following a null byte, and
thus create a SQL injection.</p>
<p>We tested and verified the null byte injection using <code>pdo_dblib</code> (FreeTDS) on a
Linux environment to access a remote Microsoft SQL Server, and also tested
against and noted the vector against <code>pdo_sqlite</code>.</p>
<h2>Action Taken</h2>
<p>We added null byte filtering in the PDO abstract component
<code>Zend_Db_Adapter_Pdo_Abstract</code>. We decided to use the abstract component to
prevent null byte injection in all the PDO adapters once we discovered the
situation was not specific to <code>pdo_dblib</code>.</p>
<p>We used the PHP's addcslashes to sanitize and properly quote null bytes:</p>
<pre><code class="language-php">$value = addcslashes($value, &quot;\000\032&quot;);
</code></pre>
<p>The following releases contain the fixes:</p>
<ul>
<li>Zend Framework 1.12.16</li>
</ul>
<h2>Recommendations</h2>
<p>If you use one of the PDO-based adapters in Zend Framework 1, we recommend
upgrading to 1.12.16 immediately.</p>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>Chris Kings-Lynne, who discovered and reported the issue against the
<code>Zend_Db_Adapter_Pdo_Mssql</code> component of ZF1;</li>
<li>
<a href="http://zimuel.it">Enrico Zimuel</a>, who provided the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2015-06: XXE/XEE vector when using ZendXml on multibyte payloads</title>
      <pubDate>Mon, 03 Aug 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2015-06</link>
      <guid>https://framework.zend.com/security/advisory/ZF2015-06</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2015-06: XXE/XEE vector when using ZendXml on multibyte payloads</h1>
<p><a href="/security/advisory/ZF2014-01">ZF2014-01</a> addressed potential XML eXternal
Entity (XXE) injection and XML Entity Expansion (XEE) vectors in Zend Framework
components that consume XML. The solution provided at the time was creation of a
new component, <a href="https://github.com/zendframework/ZendXml">ZendXml</a>, which
mitigates the vectors, and which we then incorporated into all components that
consume XML.</p>
<p>However, an independent security researcher recently discovered a vector that
remained open in ZendXml when running under PHP-FPM (PHP's FastCGI Process
Manager) when in a threaded environment: if the XML payload is in a multibyte
encoding, the heuristic we provide to detect XXE/XEE vectors can fail.</p>
<h2>Action Taken</h2>
<p>The underlying problem is threading support for libxml2 in PHP, which is what
forced us to use a heuristic detection under PHP-FPM in the first place. That
problem <a href="https://bugs.php.net/bug.php?id=64938">has been fixed in the upstream PHP project</a>,
but it only applies to PHP versions 5.5 at 5.5.22 and higher, PHP 5.6 at 5.6.6
and higher, and the PHP 7 development branch. This means that, in order to
protect all users of Zend Framework, we had to create better heuristic detection
when using an older version of PHP.</p>
<p>We updated our heuristic to do the following:</p>
<ul>
<li>If a Byte Order Mark (BOM) is detected, we use that encoding for the file
encoding.</li>
<li>If no BOM is present, we compare the opening characters against sequences in
known encodings to determine the file encoding, defaulting to UTF-8 if no
match is made.</li>
<li>The file encoding is used to determine if a charset encoding is provided in
the XML declaration.</li>
<li>We loop through each of the discovered charset and file encodings to encode
the sequence <code>&lt;!ENTITY</code> and test for the encoded string in the document. If
discovered, the heuristic fails, and we mark the document as a security
violation.</li>
</ul>
<p>For users of PHP 5.5 &gt;= 5.5.22, PHP 5.6 &gt;= 5.6.6, and PHP 7 development
builds, we never use the heuristic, and instead use the tools provided by
libxml2 to prevent external entity loading and entity expansions.</p>
<p>The following components/libraries were patched, at the version specified:</p>
<ul>
<li>ZendXml, version 1.0.1</li>
<li>Zend Framework 1, version 1.12.14</li>
<li>Zend Framework 2, versions 2.4.6 and 2.5.2</li>
</ul>
<p>This vulnerability has also been disclosed as <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-5161">CVE-2015-5161</a>.</p>
<h2>Recommendations</h2>
<p>If you use any Zend Framework components that consume XML, and use or will use
PHP-FPM during deployment, we recommend upgrading to one of these versions
immediately.</p>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>Dawid Golunski, for reporting the vector and reviewing the patch.</li>
<li>
<a href="http://www.beyondsecurity.com/ssd.html">Beyond Security's SecuriTeam Secure Disclosure Program</a>,
for cooperation.</li>
<li>
<a href="https://mwop.net/">Matthew Weier O'Phinney</a> for developing the patch.</li>
<li>
<a href="http://blog.ircmaxell.com/">Anthony Ferrara</a> for providing direction and
reviewing the patch.</li>
<li>
<a href="http://www.zimuel.it/">Enrico Zimuel</a> for reviewing the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>AG2015-01: Potential Authenticated User Spoofing in zf-oauth2</title>
      <pubDate>Thu, 23 Jul 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/AG2015-01</link>
      <guid>https://framework.zend.com/security/advisory/AG2015-01</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>AG2015-01: Potential Authenticated User Spoofing in zf-oauth2</h1>
<p>We discovered a potential issue in the Web-Server Application scenario (also
termed &quot;Authorization Code&quot;) of <a href="https://github.com/zfcampus/zf-oauth2">zf-oauth2</a>.
An attacker can pass a <code>user_id</code> value in the query string when using the
scenario, and associate the authorization code and the token to a different
user. Passing the <code>user_id</code> in the query string is a bad practice; the user
identity should be managed server side using a value from original authorization
(e.g. from the original login page).</p>
<p>The vulnerability exists in all stable versions of zf-oauth2 from 1.1.0 forward.
Only applications using the <code>authorization_code</code> scenario are affected.</p>
<h3>Action Taken</h3>
<p>We removed the ability to specify the <code>user_id</code> in the query string when
utilizing the <code>/authorize</code> resource, and we now use
<code>Zend\Authorization\AuthorizationService</code> as the default mechanism for managing
the identity of the user under this OAuth2 scenario.</p>
<p>The patch fixing the issues has been applied in the following versions:</p>
<ul>
<li>zf-oauth2 1.2.1</li>
<li>zf-oauth2 1.3.1</li>
</ul>
<p>Additionally, we have released corresponding versions of the Apigility skeleton,
used by our installer, to ensure they use these versions of zf-oauth2 by
default.</p>
<h3>Recommendations</h3>
<p>If you are using <code>zf-oauth2</code> with the web application/authorization code
scenario, we recommend upgrading zf-oauth2 to either 1.2.1 or 1.3.1. This can
usually be done using <code>composer update zfcampus/zf-oauth2</code>.</p>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>
<a href="http://www.bstechnologies.com/">Mat Wright</a>, who notified us of the issue and reviewed our patch; and</li>
<li>
<a href="http://www.zimuel.it/">Enrico Zimuel</a>, who wrote the patch for the issue.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2015-05: Potential XSS and Open Redirect vectors in zend-diactoros</title>
      <pubDate>Thu, 25 Jun 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2015-05</link>
      <guid>https://framework.zend.com/security/advisory/ZF2015-05</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2015-05: Potential XSS and Open Redirect vectors in zend-diactoros</h1>
<p>The Drupal Security Team notified us of a potential issue with the
<a href="https://github.com/zendframework/zend-diactoros">Diactoros</a> URI implementation.
Diactoros is a <a href="http://www.php-fig.org/psr/psr-7/">PSR-7</a> implementation of HTTP
messages.</p>
<p>If the path from a <code>Zend\Diactoros\Uri</code> instance is used to generate links, form
targets, or headers, and omits the scheme and authority, a potential XSS and/or
open redirect vector is possible if the path starts with double slashes and a
path segment that validates as a hostname; in such a situation, it may be
interpreted as a scheme-relative link.</p>
<p>The vulnerability exists in all stable versions of zend-diactoros prior to
1.0.4.</p>
<h2>Action Taken</h2>
<p><code>Zend\Diactoros\Uri::filterPath()</code> was updated to ensure that the returned path
will never begin with double slashes. Tests were also added to prevent a
regression in the future.</p>
<p>The patch fixing the issues has been applied in the following versions:</p>
<ul>
<li>zend-diactoros 1.0.4</li>
</ul>
<p>This vulnerability has also been disclosed as <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-3257">CVE-2015-3257</a>.</p>
<h2>Recommendations</h2>
<p>If you are using <code>Zend\Diactoros\Uri</code> to generate links, form targets, or
headers without including the scheme and authority, we recommend:</p>
<ul>
<li>Upgrading immediately to zend-diactoros 1.0.4.</li>
<li>Consider altering your code to generate absolute URIs (which can be done by
simply casting the <code>Uri</code> instance to a string).</li>
</ul>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>
<a href="https://security.drupal.org">The Drupal Security Team</a>, who notified us of
the issue and provided the proof-of-vulnerability;</li>
<li>
<a href="http://www.garfieldtech.com/">Larry Garfield</a>, who asked the Drupal Security
Team to work with us;</li>
<li>
<a href="https://mwop.net/">Matthew Weier O'Phinney</a>, who wrote the patch for the
issue.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2015-04: Potential CRLF injection attacks in mail and HTTP headers</title>
      <pubDate>Thu, 07 May 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2015-04</link>
      <guid>https://framework.zend.com/security/advisory/ZF2015-04</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2015-04: Potential CRLF injection attacks in mail and HTTP headers</h1>
<p>The CRLF Injection Attack (sometimes also referred to as HTTP Response
Splitting) is a fairly simple, yet extremely powerful web attack. It has been
reported in detail in &quot;<a href="http://cwe.mitre.org/data/definitions/113.html">CWE-113 Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')</a>&quot;.</p>
<p>CRLF (Carriage Return <code>&quot;\r&quot;</code> and Line Feed <code>&quot;\n&quot;</code>) is a significant sequence of
characters, representing the the End Of Line (EOL) marker for many Internet
protocols, including, but not limited to MIME (e-mail), NNTP (newsgroups), and,
more importantly, HTTP. When programmers write code for web applications, they
split headers based on where the CRLF is found. If a malicious user is able to
inject his own CRLF sequence into an HTTP stream, he is able to maliciously
control the way a web application functions.</p>
<p>For instance, the following attack is possible using <code>Zend\Mail</code>:</p>
<pre><code class="language-php">$message = new Zend\Mail\Message();
$message-&gt;setSubject(
    &quot;test1\r\nContent-Type: text/html; charset = \&quot;iso-8859-1\&quot;\r\n\r\n&quot;
    . &quot;&lt;iframe src=\&quot;http://example.com/\&quot;&gt;&lt;/iframe&gt;&quot;
    . &quot;&lt;!--&quot;
);
$message-&gt;setBody(&quot;This is the real body!&quot;);
var_dump($message-&gt;toString());
</code></pre>
<p>This <code>var_dump()</code> shows that the string contains a double CRLF sequence. A mail
server will interpret the HTML code as the message body, instead of the correct
one, executing the attack!</p>
<p>The other Zend Framework component affected by CRLF Injection Attack is <code>Zend\Http</code>.</p>
<h2>Action Taken</h2>
<p>In Zend Framework 2, we added three new classes:</p>
<ul>
<li>
<code>Zend\Mail\Header\HeaderName</code>
</li>
<li>
<code>Zend\Mail\Header\HeaderValue</code>
</li>
<li>
<code>Zend\Http\Header\HeaderValue</code>
</li>
</ul>
<p>Each defines three static methods:</p>
<ul>
<li>
<code>filter($value)</code>, for filtering a value based on the relevant IETF specification.</li>
<li>
<code>isValid($value)</code>, for validating that a value only contains characters defined in the relevant IETF specification.</li>
<li>
<code>assertValid($value)</code>, for asserting that a value is valid (raises an exception for invalid values).</li>
</ul>
<p>We updated the header classes in each component to use the <code>isValid()</code> and
<code>assertValid()</code> methods to validate data provided to the class and raise an
exception for invalid data. These utilities are used both when deserializing a
header value, as well as when providing data via constructors and setters,
ensuring that the classes can only emit valid data.</p>
<p>Additionally, we updated deserialization methods in classes representing mail
messages and HTTP request and response messages to scan for CRLF injection
attempts, and they now raise exceptions on detection.</p>
<p>Users may use the <code>isValid()</code> methods to pro-actively check for invalid values,
and/or the <code>filter()</code> methods to sanitize data to use for headers. In the latter
case, developers should be aware that filtering is lossy, as it strips any
invalid characters detected.</p>
<p>For Zend Framework 1, we applied a similar solution as for Zend Framework2,
introducing <code>Zend_Mail_Header_HeaderName</code>, <code>Zend_Mail_Header_HeaderValue</code>, and
<code>Zend_Http_Header_HeaderValue</code>, each with the same static methods and approach
as above. The <code>Zend_Mail_Message</code>, <code>Zend_Mail_Part</code>, <code>Zend_Http_Client</code>,
<code>Zend_Http_Request</code>, <code>Zend_Http_Response</code>, and <code>Zend_Http_Header_SetCookie</code>
classes were audited to ensure that they assert valid values.</p>
<p>The following specifications were used when developing the solution:</p>
<ul>
<li>
<a href="https://www.ietf.org/rfc/rfc2822.txt">RFC 2822</a> for mail headers.</li>
<li>
<a href="https://www.ietf.org/rfc/rfc7230.txt">RFC 7230</a> for HTTP headers.</li>
</ul>
<p>The patch fixing the issues has been applied in the following versions:</p>
<ul>
<li>Zend Framework 1.12.12</li>
<li>Zend Framework 2.3.8</li>
<li>Zend Framework 2.4.1</li>
</ul>
<p>This vulnerability has also been disclosed as <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-3154">CVE-2015-3154</a>.</p>
<h2>Recommendations</h2>
<p>If you are using <code>Zend\Mail</code> or <code>Zend\Http</code> from Zend Framework 2 (either
standalone, or within components like <code>Zend\Mvc</code>), or if you are using the
<code>Zend_Mail</code> or <code>Zend_Http</code> components from Zend Framework 1, we recommend
upgrading immediately.</p>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>
<a href="https://github.com/Slamdunk">Filippo Tessarotto</a>, who reported the issue on
<code>Zend\Mail</code>; and</li>
<li>
<a href="https://github.com/ezimuel">Enrico Zimuel</a>, who provided the initial patch,
as well as ongoing review; and</li>
<li>
<a href="https://github.com/Maks3w">Maks3w</a>, who reported the <code>Zend\Http</code> issue, and
who reviewed the patch and proposed improvements; and</li>
<li>
<a href="https://github.com/weierophinney">Matthew Weier O'Phinney</a>, who reviewed,
tested, and finalized the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ZF2015-03: Invalid CSRF validation of null or incorrectly formatted token identifiers</title>
      <pubDate>Thu, 12 Mar 2015 00:00:00 +0000</pubDate>
      <link>https://framework.zend.com/security/advisory/ZF2015-03</link>
      <guid>https://framework.zend.com/security/advisory/ZF2015-03</guid>
      <author>zf-security@zend.com (Zend Framework Security)</author>
      <dc:creator>Zend Framework Security</dc:creator>
      <content:encoded><![CDATA[<h1>ZF2015-03: Invalid CSRF validation of null or incorrectly formatted token identifiers</h1>
<p><code>Zend\Validator\Csrf</code>, starting in the Zend Framework 2.3 series, was not
correctly identifying null or mal-formatted token identifiers, leading to false
positive validations, and thus potentially allowing for Cross-Site Request
Forgery vectors.</p>
<h2>Action Taken</h2>
<p>A patch was written that correctly identifies invalid token identifiers,
ensuring that they invalidate the provided value.</p>
<p>The patch fixing the issue has been applied in the following versions:</p>
<ul>
<li>Zend Framework 2.3.6</li>
</ul>
<p>Note: in testing the patch, we discovered that the vulnerability was introduced
specifically in the 2.3 series, and thus no patch was necessary against the 2.2
series.</p>
<p>This vulnerability has also been disclosed as <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-1786">CVE-2015-1786</a>.</p>
<h2>Recommendations</h2>
<p>If you are using <code>Zend\Validator\Csrf</code> (either standalone, or within
<code>Zend\InputFilter</code> or via <code>Zend\Form\Element\Csrf</code>) in the 2.3 series of Zend
Framework, we recommend upgrading immediately.</p>
<h2>Other Information</h2>
<h3>Acknowledgments</h3>
<p>The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:</p>
<ul>
<li>Alex Barnes, who reported the issue; and</li>
<li>
<a href="https://github.com/Maks3w">Maks3w</a>, who provided the initial patch; and</li>
<li>
<a href="https://github.com/ezimuel">Enrico Zimuel</a>, who reviewed, tested, and
finalized the patch.</li>
</ul>
]]></content:encoded>
      <slash:comments>0</slash:comments>
    </item>
  </channel>
</rss>
