<?xml version="1.0" encoding="us-ascii"?><InstanceReport xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Version>2.4.0.8</Version><ReportLongName>0023 - Disclosure - 18. COMMITMENTS, CONTINGENCIES AND LEGAL PROCEEDINGS</ReportLongName><DisplayLabelColumn>true</DisplayLabelColumn><ShowElementNames>false</ShowElementNames><RoundingOption /><HasEmbeddedReports>false</HasEmbeddedReports><Columns><Column FlagID="0"><Id>1</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><CurrencyCode /><FootnoteIndexer /><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName /><CurrencySymbol /><contextRef><ContextID>From2012-10-01to2013-06-30</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001074828</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2012-10-01T00:00:00</PeriodStartDate><PeriodEndDate>2013-06-30T00:00:00</PeriodEndDate><Segments /><Scenarios /></contextRef><UPS /><CurrencyCode /><OriginalCurrencyCode /></MCU><CurrencySymbol /><Labels><Label Key="CalendarSupplement" Id="0" Label="9 Months Ended" /><Label Key="Calendar" Id="1" Label="Jun. 30, 2013" /></Labels></Column></Columns><Rows><Row FlagID="0"><Id>1</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>1</Level><ElementName>VSUL_NotesToFinancialStatementsAbstract</ElementName><ElementPrefix>VSUL_</ElementPrefix><IsBaseElement>false</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>xbrli:stringItemType</ElementDataType><SimpleDataType>string</SimpleDataType><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>Notes to Financial Statements</Label></Row><Row FlagID="0"><Id>2</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>2</Level><ElementName>us-gaap_CommitmentsAndContingenciesDisclosureTextBlock</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="From2012-10-01to2013-06-30" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText>&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0"&gt;LEGAL PROCEEDINGS&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;There are no pending legal proceedings against the Company that are
expected to have a material adverse effect on its cash flows, financial condition or results of operations.&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;On May 31, 2013, the Company exercised its option to purchase the
4,000,000 Option Shares from Ascendiant and paid to Ascendiant the $300,000 purchase price.&amp;#160;&amp;#160;To date, Ascendiant has
delivered only&amp;#160;&amp;#160;2,284,525 of the 4,000,000 Option Shares purchased by the Company and has failed to deliver the remaining
1,715,475 Option Shares. On June 17, 2013, the Company filed a complaint (the &amp;#147;Complaint&amp;#148;) against Ascendiant Capital
Partners, LLC (&amp;#147;Ascendiant&amp;#148;) in the Orange County Superior Court of California (Case No. 30-2013-00656770-CU-BC-CJC)
for breach of contract, seeking damages, specific performance and injunctive relief against Ascendiant. In its Complaint, the Company
alleged that Ascendiant breached its obligations under the Option Agreement by delivering to the Company only 2,284,525 of the
4,000,000 Option Shares and failing to deliver the remaining 1,715,475 Option Shares. The Company filed a motion for preliminary
injunction with the California Superior Court, seeking preliminary injunctive relief requiring Ascendiant to transfer the remaining
1,715,475 Option Shares to Visualant or, in the alternative, enjoining Ascendiant from transferring, selling, or otherwise encumbering
the Option Shares.&amp;#160;&amp;#160;The Compliant is currently being reviewed by the California Superior Court.&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;EMPLOYMENT AGREEMENTS&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;Mr. Erickson, Mr. Scott and other named executive officers of Visualant
do not have employment agreements.&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;LEASES&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;The Company is obligated under various non-cancelable operating leases
for their various facilities and certain equipment.&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&lt;b&gt;Corporate Offices&lt;/b&gt;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-indent: 0.5in; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;The Company&amp;#146;s executive office is located at 500 Union Street,
Suite 420, Seattle, Washington, USA, 98101. On August 1, 2012, the Company entered into a lease which expires August 31, 2014.
The monthly lease rate was $1,944 for the year ending August 31, 2013 and $2,028 for the year ending August 31, 2014. On June 14,
2013, the Company amended the lease and added Suite 450, increasing our monthly payment to $3,978 through August 31, 2013, $4,057
from September 1, 2013 to May 31, 2014 and $4,140 from June 1, 2014 through August 31, 2014.&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&lt;b&gt;TransTech Facilities&lt;/b&gt;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;TransTech is located at 12142 NE Sky Lane, Suite 130, Aurora, OR
97002. They lease a total of approximately 9,750 square feet of office and warehouse space for its administrative offices, product
inventory and shipping operations, at a monthly rental of $4,292. The lease was extended from March 2011 for an additional five
year term at a monthly rental of $4,751. There are two additional five year renewals with a set accelerating increase of 10% per
5 year term.&amp;#160;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-align: justify"&gt;The aggregate future minimum lease payments under operating leases,
to the extent the leases have early cancellation options and excluding escalation charges, are as follows:&lt;/p&gt;

&lt;p style="font: 8pt Times New Roman, Times, Serif; margin: 0; text-indent: 0.5in"&gt;&amp;#160;&lt;/p&gt;

&lt;table cellspacing="0" cellpadding="0" style="font: 8pt Times New Roman, Times, Serif; width: 100%"&gt;
&lt;tr style="vertical-align: bottom"&gt;
    &lt;td style="padding-bottom: 1.5pt; text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;Years Ended June 30,&lt;/font&gt;&lt;/td&gt;
    &lt;td style="padding-bottom: 1.5pt"&gt;&amp;#160;&lt;/td&gt;
    &lt;td colspan="2" style="border-bottom: black 1.5pt solid; text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;Total&lt;/font&gt;&lt;/td&gt;
    &lt;td nowrap="nowrap" style="padding-bottom: 1.5pt"&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: bottom; background-color: #CCEEFF"&gt;
    &lt;td style="width: 77%; text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;2014&lt;/font&gt;&lt;/td&gt;
    &lt;td style="width: 1%; text-align: right"&gt;&amp;#160;&lt;/td&gt;
    &lt;td style="width: 1%"&gt;&lt;font style="font-size: 8pt"&gt;$&lt;/font&gt;&lt;/td&gt;
    &lt;td style="width: 20%; text-align: right"&gt;&lt;font style="font-size: 8pt"&gt;105,611&lt;/font&gt;&lt;/td&gt;
    &lt;td nowrap="nowrap" style="width: 1%"&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: bottom; background-color: white"&gt;
    &lt;td style="text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;2015&lt;/font&gt;&lt;/td&gt;
    &lt;td style="text-align: right"&gt;&amp;#160;&lt;/td&gt;
    &lt;td&gt;&amp;#160;&lt;/td&gt;
    &lt;td style="text-align: right"&gt;&lt;font style="font-size: 8pt"&gt;65,292&lt;/font&gt;&lt;/td&gt;
    &lt;td nowrap="nowrap"&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: bottom; background-color: #CCEEFF"&gt;
    &lt;td style="text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;2016&lt;/font&gt;&lt;/td&gt;
    &lt;td style="text-align: right"&gt;&amp;#160;&lt;/td&gt;
    &lt;td&gt;&amp;#160;&lt;/td&gt;
    &lt;td style="text-align: right"&gt;&lt;font style="font-size: 8pt"&gt;38,008&lt;/font&gt;&lt;/td&gt;
    &lt;td nowrap="nowrap"&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: bottom; background-color: white"&gt;
    &lt;td style="text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;2017&lt;/font&gt;&lt;/td&gt;
    &lt;td style="text-align: right"&gt;&amp;#160;&lt;/td&gt;
    &lt;td&gt;&amp;#160;&lt;/td&gt;
    &lt;td style="text-align: right"&gt;&lt;font style="font-size: 8pt"&gt;-&lt;/font&gt;&lt;/td&gt;
    &lt;td nowrap="nowrap"&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: bottom; background-color: #CCEEFF"&gt;
    &lt;td style="text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;2018&lt;/font&gt;&lt;/td&gt;
    &lt;td style="text-align: right"&gt;&amp;#160;&lt;/td&gt;
    &lt;td&gt;&amp;#160;&lt;/td&gt;
    &lt;td style="text-align: right"&gt;&lt;font style="font-size: 8pt"&gt;-&lt;/font&gt;&lt;/td&gt;
    &lt;td nowrap="nowrap"&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: bottom; background-color: white"&gt;
    &lt;td style="padding-bottom: 1.5pt; text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;Beyond&lt;/font&gt;&lt;/td&gt;
    &lt;td style="padding-bottom: 1.5pt; text-align: right"&gt;&amp;#160;&lt;/td&gt;
    &lt;td style="border-bottom: black 1.5pt solid"&gt;&amp;#160;&lt;/td&gt;
    &lt;td style="border-bottom: black 1.5pt solid; text-align: right"&gt;&lt;font style="font-size: 8pt"&gt;-&lt;/font&gt;&lt;/td&gt;
    &lt;td nowrap="nowrap" style="padding-bottom: 1.5pt"&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: bottom; background-color: #CCEEFF"&gt;
    &lt;td style="padding-bottom: 3pt; text-align: center"&gt;&lt;font style="font-size: 8pt"&gt;Total&lt;/font&gt;&lt;/td&gt;
    &lt;td style="padding-bottom: 3pt; text-align: right"&gt;&amp;#160;&lt;/td&gt;
    &lt;td style="border-bottom: black 2.25pt double"&gt;&lt;font style="font-size: 8pt"&gt;$&lt;/font&gt;&lt;/td&gt;
    &lt;td style="border-bottom: black 2.25pt double; text-align: right"&gt;&lt;font style="font-size: 8pt"&gt;208,911&lt;/font&gt;&lt;/td&gt;
    &lt;td nowrap="nowrap" style="padding-bottom: 3pt"&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</NonNumbericText><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>nonnum:textBlockItemType</ElementDataType><SimpleDataType>na</SimpleDataType><ElementDefenition>The entire disclosure for commitments and contingencies.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 210

 -SubTopic 10

 -Section S99

 -Paragraph 1

 -Subparagraph (SX 210.5-02.25)

 -URI http://asc.fasb.org/extlink&amp;oid=6877327&amp;loc=d3e13212-122682



Reference 2: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 825

 -SubTopic 20

 -Section 50

 -Paragraph 1

 -URI http://asc.fasb.org/extlink&amp;oid=6449706&amp;loc=d3e16207-108621



Reference 3: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 460

 -SubTopic 10

 -Section 50

 -Paragraph 8

 -URI http://asc.fasb.org/extlink&amp;oid=6398077&amp;loc=d3e12565-110249



Reference 4: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 450

 -SubTopic 20

 -Section 50

 -Paragraph 4

 -URI http://asc.fasb.org/extlink&amp;oid=25496072&amp;loc=d3e14435-108349



Reference 5: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 440

 -SubTopic 10

 -Section 50

 -Paragraph 2

 -URI http://asc.fasb.org/extlink&amp;oid=6394976&amp;loc=d3e25287-109308



</ElementReferences><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>18. COMMITMENTS, CONTINGENCIES AND LEGAL PROCEEDINGS</Label></Row></Rows><Footnotes /><IsEquityReport>false</IsEquityReport><ReportName>18. COMMITMENTS, CONTINGENCIES AND LEGAL PROCEEDINGS</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>true</HasCustomUnits><IsEmbedReport>false</IsEmbedReport><IsMultiCurrency>false</IsMultiCurrency><ReportType>Sheet</ReportType><RoleURI>http://visualant.net/role/CommitmentsContingenciesAndLegalProceedings</RoleURI><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows></InstanceReport>
