<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Security issue in SimpleCaptcha</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114339766" />
  <subtitle>Security issue in SimpleCaptcha</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114339766</id>
  <updated>2026-04-07T10:22:57Z</updated>
  <dc:date>2026-04-07T10:22:57Z</dc:date>
  <entry>
    <title>RE: Security issue in SimpleCaptcha</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114353015" />
    <author>
      <name>Milen Dyankov</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114353015</id>
    <updated>2019-07-18T14:34:24Z</updated>
    <published>2019-07-18T14:34:24Z</published>
    <summary type="html">Hi Mateusz Makos,&lt;br /&gt;&lt;br /&gt;I removed the view permissions from this entry as it is security related. &lt;br /&gt;I&amp;#39;m told you are in contact with our security team via e-mail / JIRA so please keep using those channels.&lt;br /&gt;Best,&lt;br /&gt;​​​​​​​Milen</summary>
    <dc:creator>Milen Dyankov</dc:creator>
    <dc:date>2019-07-18T14:34:24Z</dc:date>
  </entry>
  <entry>
    <title>RE: Security issue in SimpleCaptcha</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114342779" />
    <author>
      <name>Tomáš Polešovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114342779</id>
    <updated>2019-07-17T13:39:54Z</updated>
    <published>2019-07-17T13:39:54Z</published>
    <summary type="html">Hi,I take a look at the problem. I&amp;#39;d like to ask you to send security sensitive topics to the community security team (security @ liferay.com). This is not severe issue but it&amp;#39;s better to discuss things in private, you may put in risk customers and community deployments. Thank you. </summary>
    <dc:creator>Tomáš Polešovský</dc:creator>
    <dc:date>2019-07-17T13:39:54Z</dc:date>
  </entry>
  <entry>
    <title>Security issue in SimpleCaptcha</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114339765" />
    <author>
      <name>Mateusz Makos</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114339765</id>
    <updated>2019-07-17T09:42:17Z</updated>
    <published>2019-07-17T09:42:17Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;I'm facing which&amp;nbsp;security issue in Liferay default CAPTCHA. &lt;br&gt;Steps to reproduce error below :&lt;br&gt;As a Guest (not logged in user) I go to the site: &lt;a href="http://localhost:8080/web/guest/home"&gt;http://localhost:8080/web/guest/home&lt;/a&gt;. I click Sign In -&amp;gt; Create Account. I fill in the fields with data in such a way that after I click Save button the page will be reloaded and I get validation messager (e.g. if enter Screen name that already exist In database or I enter incorrect Text Verification). As a password I enter: test1. I click the Save button. After reloading the page I go to site source code. I'm looking for a previous entered password (phrase "test1"). I was able to find this phrase in 2 places. Code snippets below.&lt;br&gt;Code snippet 1:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="taglib-captcha"&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;img alt="Text to Identify" class="captcha" id="_com_liferay_login_web_portlet_LoginPortlet_captcha" src="http://localhost:8080/web/guest/home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&amp;amp;amp;p_p_lifecycle=2&amp;amp;amp;p_p_state=maximized&amp;amp;amp;p_p_mode=view&amp;amp;amp;p_p_resource_id=%2Flogin%2Fcaptcha&amp;amp;amp;p_p_cacheability=cacheLevelPage&amp;amp;amp;p_p_lifecycle=1&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_redirect=&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_birthday=01%2F01%2F1970&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_lastName=test&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_javax.portlet.action=%2Flogin%2Fcreate_account&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_formDate=1563352565441&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_openId=&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_suffixValue=&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_languageId=en_US&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_prefixValue=&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_screenName=test&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_birthdayMonth=0&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=%2Flogin%2Fcreate_account&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_firstName=test&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_emailAddress=test%40test.com&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_birthdayDay=1&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_middleName=&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_[b]password2=test1[/b]&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_captchaText=22222222222&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_cmd=add&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_[b]password1=test1[/b]&amp;amp;amp;_com_liferay_login_web_portlet_LoginPortlet_birthdayYear=1970&amp;amp;amp;t=1563352591357"&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;Code snippet 2:&lt;br&gt;&lt;pre&gt;&lt;code&gt;var refreshCaptcha = document.getElementById('_com_liferay_login_web_portlet_LoginPortlet_refreshCaptcha');
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;if (refreshCaptcha) {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;refreshCaptcha.addEventListener(
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;'click',
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;function() {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;var url = Liferay.Util.addParams('t=' + Date.now(), 'http\x3a\x2f\x2flocalhost\x3a8080\x2fweb\x2fguest\x2fhome\x3fp_p_id\x3dcom_liferay_login_web_portlet_LoginPortlet\x26p_p_lifecycle\x3d2\x26p_p_state\x3dmaximized\x26p_p_mode\x3dview\x26p_p_resource_id\x3d\x252Flogin\x252Fcaptcha\x26p_p_cacheability\x3dcacheLevelPage\x26p_p_lifecycle\x3d1\x26_com_liferay_login_web_portlet_LoginPortlet_redirect\x3d\x26_com_liferay_login_web_portlet_LoginPortlet_birthday\x3d01\x252F01\x252F1970\x26_com_liferay_login_web_portlet_LoginPortlet_lastName\x3dtest\x26_com_liferay_login_web_portlet_LoginPortlet_javax\x2eportlet\x2eaction\x3d\x252Flogin\x252Fcreate_account\x26_com_liferay_login_web_portlet_LoginPortlet_formDate\x3d1563352565441\x26_com_liferay_login_web_portlet_LoginPortlet_openId\x3d\x26_com_liferay_login_web_portlet_LoginPortlet_suffixValue\x3d\x26_com_liferay_login_web_portlet_LoginPortlet_languageId\x3den_US\x26_com_liferay_login_web_portlet_LoginPortlet_prefixValue\x3d\x26_com_liferay_login_web_portlet_LoginPortlet_screenName\x3dtest\x26_com_liferay_login_web_portlet_LoginPortlet_birthdayMonth\x3d0\x26_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName\x3d\x252Flogin\x252Fcreate_account\x26_com_liferay_login_web_portlet_LoginPortlet_firstName\x3dtest\x26_com_liferay_login_web_portlet_LoginPortlet_emailAddress\x3dtest\x2540test\x2ecom\x26_com_liferay_login_web_portlet_LoginPortlet_birthdayDay\x3d1\x26_com_liferay_login_web_portlet_LoginPortlet_middleName\x3d\x26_com_liferay_login_web_portlet_LoginPortlet_[b]password2\x3dtest1[/b]\x26_com_liferay_login_web_portlet_LoginPortlet_captchaText\x3d22222222222\x26_com_liferay_login_web_portlet_LoginPortlet_cmd\x3dadd\x26_com_liferay_login_web_portlet_LoginPortlet_[b]password1\x3dtest1[/b]\x26_com_liferay_login_web_portlet_LoginPortlet_birthdayYear\x3d1970');
&amp;amp;nbsp;var captcha = document.getElementById('_com_liferay_login_web_portlet_LoginPortlet_captcha');
​​​​​​​if (captcha) {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;captcha.setAttribute('src', url);
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;);
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;I was able to reproduce this error on LF 7.1 GA3 CE and LF 7.2 GA1 CE. I work on default LF create account portret (not modified). CAPTCHA settings in Control Panel is set to default. &lt;br&gt;Additional observations:&lt;br&gt;&lt;ul style="list-style: disc outside;"&gt;&lt;li&gt;error not occurs if I turn off CAPTCHA (go to Control Panel –&amp;gt; System Settings –&amp;gt; Security Tools in SECURITY section–&amp;gt; uncheck checkbox ‘Create Account CAPTCHA Enabled’)&lt;/li&gt;&lt;li&gt;it’s not relevant if I enter correct or incorrect Text Verification&lt;/li&gt;&lt;li&gt;error not occurs if I change CAPTCHA Engine to reCAPTCHA&lt;/li&gt;&lt;/ul&gt;I suppose the problem occurs in Liferay implementation of CAPTCHA (SimpleCaptcha).&lt;br&gt;Is there any way to deal with this error without changing CAPTCHA engine or disabling CAPTCHA?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Mateusz Makos</dc:creator>
    <dc:date>2019-07-17T09:42:17Z</dc:date>
  </entry>
</feed>
