# CVE-2007-2056: The getlock function in aimage/aimage.cpp in AFFLIB 2.2.8 and earlier allows local users to overwrite arbitrary files via a symlink attack o


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** No
- **Published:** 30 Apr 2007
- **Updated:** 19 Oct 2018

## What is CVE-2007-2056?

CVE-2007-2056 is a vulnerability, published on 30 Apr 2007. 

### Official description

The getlock function in aimage/aimage.cpp in AFFLIB 2.2.8 and earlier allows local users to overwrite arbitrary files via a symlink attack on temporary lock files (aka "time-of-check-time-of-use file race"). NOTE: the researcher has retracted the original advisory, stating that "the portion of vulnerable code is not called in any current version of AFFLIB and is therefore not exploitable.

## Which versions are affected by CVE-2007-2056?


## How do I fix CVE-2007-2056?

No fix has been published for CVE-2007-2056 yet. Limit exposure of the affected software until one is available.

## Is CVE-2007-2056 being exploited?

There is no known exploitation of CVE-2007-2056 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2007-2056 and fix it if it is affected.

What it is: CVE-2007-2056 is a vulnerability, published on 30 Apr 2007. 
Exploitation: There is no known exploitation of CVE-2007-2056 in the wild and no public exploit code.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2007-2056/ (Markdown: https://insights.sbomify.com/CVE-2007-2056/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2007-2056
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2007-2056
- OSV: https://osv.dev/vulnerability/CVE-2007-2056

---
From sbomify Insights: https://insights.sbomify.com/CVE-2007-2056/
Summaries are generated and may contain mistakes; the official description above is the record.
