<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:09:00 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[AAA-239] SQL injection in the aaa-idm-store-h2 (deleteRole function)</title>
                <link>https://jira.opendaylight.org/browse/AAA-239</link>
                <project id="10102" key="AAA">aaa</project>
                    <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I am writing to report a vulnerability in one of the components of Opendaylight, aaa.&lt;/p&gt;

&lt;p&gt;With this bug, attackers can SQL inject the component&apos;s database(SQLite).&lt;/p&gt;

&lt;p&gt;The bug is in /aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/RoleStore.java (&lt;b&gt;deleteRole&lt;/b&gt; function).&lt;/p&gt;

&lt;p&gt;As we can see, the aaa concats roleid information to build a delete SQL query, and it executes the query in SQLite.&lt;/p&gt;

&lt;p&gt;However, in line 181, the roleid(escaped)&#160; is a string. If the user calls the api interface /auth/v1/roles/ to add a malicious role, and then calls the &lt;b&gt;deleteRole&lt;/b&gt; function to delete the role, it will cause SQL injection.&lt;/p&gt;

&lt;p&gt;For example, he can call the api interface /auth/v1/roles/ with POST method, it will call the &lt;b&gt;createRole&lt;/b&gt; function to add a user. If the role name is:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&apos; or 1=1--+&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Then call the api interface /auth/v1/roles/&apos; or 1=1--+@DOMAIN_ID with DELETE method, it will call the &lt;b&gt;deleteRole&lt;/b&gt; function to delete the user. And the SQL query is:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;DELETE FROM AAA_ROLES WHERE roleid = &apos;&apos; or 1=1&#8212;+&apos;@DOMAIN_ID&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;And all the elements in the &lt;b&gt;AAA_ROLES&lt;/b&gt; table are removed due to this malicious query.&lt;/p&gt;

&lt;p&gt;Please consider fixing this security vulnerability as soon as possible.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Best wishes,&lt;/p&gt;

&lt;p&gt;Chunyang Han&lt;/p&gt;</description>
                <environment>&lt;p&gt;ubuntu22.04, aaa version 0.17.0&lt;/p&gt;</environment>
        <key id="36314">AAA-239</key>
            <summary>SQL injection in the aaa-idm-store-h2 (deleteRole function)</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.opendaylight.org/images/icons/priorities/minor.svg">Low</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="anemone">Han Chunyang</reporter>
                        <labels>
                            <label>security</label>
                    </labels>
                <created>Wed, 16 Nov 2022 06:51:14 +0000</created>
                <updated>Sat, 3 Dec 2022 01:18:41 +0000</updated>
                            <resolved>Wed, 16 Nov 2022 18:07:00 +0000</resolved>
                                    <version>0.15.0</version>
                    <version>0.16.0</version>
                    <version>0.15.6</version>
                    <version>0.16.4</version>
                                    <fixVersion>0.17.0</fixVersion>
                    <fixVersion>0.16.5</fixVersion>
                    <fixVersion>0.15.8</fixVersion>
                                        <due>Wed, 30 Nov 2022 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                    <workratio workratioPercent="0"/>
                                    <progress percentage="0">
                                    <originalProgress>
                                                    <row percentage="100" backgroundColor="#89afd7"/>
                                            </originalProgress>
                                                    <currentProgress>
                                                    <row percentage="0" backgroundColor="#51a825"/>
                                                    <row percentage="40" backgroundColor="#ec8e00"/>
                                                    <row percentage="60" backgroundColor="transparent"/>
                                            </currentProgress>
                            </progress>
                                    <aggregateprogress percentage="0">
                                    <originalProgress>
                                                    <row percentage="100" backgroundColor="#89afd7"/>
                                            </originalProgress>
                                                    <currentProgress>
                                                    <row percentage="0" backgroundColor="#51a825"/>
                                                    <row percentage="40" backgroundColor="#ec8e00"/>
                                                    <row percentage="60" backgroundColor="transparent"/>
                                            </currentProgress>
                            </aggregateprogress>
                                    <timeoriginalestimate seconds="288000">2 weeks</timeoriginalestimate>
                            <timeestimate seconds="115200">4 days</timeestimate>
                                        <comments>
                            <comment id="71629" author="rovarga" created="Wed, 16 Nov 2022 17:26:50 +0000"  >&lt;p&gt;Thanks for the report, &lt;a href=&quot;https://git.opendaylight.org/gerrit/c/aaa/+/103241&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/c/aaa/+/103241&lt;/a&gt; should take care of this.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i043fb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>