CVE-2018-16666
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedAn issue was discovered in Contiki-NG through 4.1. There is a stack-based buffer overflow in next_string in os/storage/antelope/aql-lexer.c while parsing AQL (parsing next string).
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA stack-based buffer overflow exists in the next_string function within os/storage/antelope/aql-lexer.c in Contiki-NG through version 4.1. During AQL (Antelope Query Language) string parsing, the function fails to validate string length bounds before copying data onto the stack, allowing overflow when processing maliciously crafted AQL queries.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data<= 4.1CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Local
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Contiki-NG version in useSearch the codebase or build configuration for version identifiers. Check for version files, git tags, or version constants. Look for version.h or similar version definition files in the Contiki-NG source tree.Affected if The version is 4.1 or earlier, or the version cannot be determined but the codebase appears to be Contiki-NG through version 4.1
-
Confirm AQL (Antelope) module is presentSearch the codebase for the file os/storage/antelope/aql-lexer.c or the antelope directory. Check project configuration files (Makefile, project-conf.h) for references to ANTELOPE or AQL storage features.Affected if The aql-lexer.c file exists in the os/storage/antelope/ directory, indicating the vulnerable code is present in the build
-
Check if AQL storage is enabled in buildReview build configuration files (Makefile, project-conf.h, or similar) for compilation flags that enable the Antelope storage module. Look for variables like WITH_ANTELOPE, ENABLE_AQL_STORAGE, or similar feature flags.Affected if The Antelope/AQL storage module is compiled into the firmware or application binary
-
Inspect next_string function for bounds checkingLocate and examine the next_string function in os/storage/antelope/aql-lexer.c. Look for any length validation or bounds checking before string copy operations (such as strcpy, memcpy, or similar).Affected if The next_string function lacks proper length validation before copying strings onto the stack, allowing overflow on malicious input
The environment is affected if Contiki-NG version 4.1 or earlier is in use, the Antelope/AQL storage module is compiled in, and the next_string function in aql-lexer.c lacks bounds checking before stack-based string copies.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
From vendor dataUpdate Contiki-NG to version 4.2 or later which contains the patch. If no update is available, implement bounds checking in the next_string function to validate string lengths against buffer allocations before copying, and add input validation on AQL query strings.
- Consultation2.0 h
- Implementation4.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2018-16666 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2018-16666 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data