All projects with patches now have outreach docs. 276 new docs covering CWE-407, CWE-312, CWE-362 across C, C++, Java, Python, Go, Rust, C#, PHP, Ruby, JavaScript, Dart, Erlang, R, and more. Outreach gap: 276 -> 0.
1.7 KiB
SuiteCRM — CWE-407 Disclosure Brief (suitecrm-0006)
2026-04-13 · Patch available — awaiting upstream merge
Finding
An O(H×M) linear scan in LuceneSearchEngine::parseHits() at lib/Search/AOD/LuceneSearchEngine.php:187. For each search hit, in_array() scans the $modules array to filter by module type, performing O(M) per hit where M = number of module filters.
The Defect
suitecrm-0006 (PATCHED — LOW): LuceneSearchEngine.php:187
foreach ($hits as $hit) {
if(!in_array($hit->record_module, $modules, true)){
// O(M) per hit — linear scan
continue;
}
Complexity Proof
At H=10,000 search hits, M=20 module filters:
- Defective: 10,000 × 20 = 200,000 comparisons
- Fixed: 20 array_flip + 10,000 × O(1) = 10,020 operations
- 20× op reduction
Impact
SuiteCRM's Lucene search returns results across all modules. parseHits() fires on every search query. Users searching large CRM databases with many results and multiple module filters trigger the worst case.
The Fix
Use array_flip() to convert $modules to a hash-keyed array, then use isset() for O(1) lookups:
$modules_set = array_flip($modules);
if(!isset($modules_set[$hit->record_module])){
Patch
Fix available: defects/suitecrm-0006/patch/suitecrm-0006-lucene-parsehits-in_array.patch
20× op reduction at H=10,000, M=20.
What We Ask
- Confirm receipt and assign a GitHub issue reference (salesagility/SuiteCRM).
- Coordinate a disclosure date — targeting 90 days from first contact.
- We will credit the SuiteCRM team in the public disclosure.
Contact: see cover email. This brief is confidential until coordinated disclosure.